On Apr 6, 2011, at 7:56 PM, Mark Sobkowicz wrote:

> I've got jquery mobile basically working with my hobo app, so that a regular 
> browser sees the regular hobo app but a mobile browser (as defined by the 
> mobile-fu plugin) gets the jquery mobile views.    For the mobile views I'm 
> not trying to use dryml at all - though I could imagine a jquery-mobile 
> theme.   So here is my question.  I have two models, List and Element.    
> List has_many Elements, Element belongs_to List, List has children Elements.  
>  I thought that by having Elements be children of the List, I must get for 
> free an array of elements in the List Show view.    Do I?  I tried @elements 
> and @children, and neither exists.   I can add @elements = Element.find... to 
> my controller which of course works, but I am curious as to what the 
> hobo_show generates when the model has children.   I tried to find it in the 
> gem but I was not Ruby ninja enough to figure it out.

If you check out the source of a generated show-page with a child collection, 
you'll see something like this:

<collection:some_collection_name />

Hobo accesses the child records via the association, thus they don't end up in 
a separate instance variable.

--Matt Jones

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en.

Reply via email to