On Dec 14, 2010, at 9:44 AM, Tuishimi wrote:

> My question is this:  If I have class A that specifies in the view
> hints file children of B, shouldn't B be available to me in the show
> for class A in a with statement?  Doesn't Hobo go out and snag it
> automagically?
> 
> So...
> 
> Class A
>   has_many B
> 
> ...
> 
> view hint
>   children :B
> 
> ...
> 
> show
> 
> <with with="&@B">...
> 
> ...where B is the same as the has_many reference, but I am getting nil
> class method...

The association is available where you'd expect: @a.association_name_plural or 
this.association_name_plural

You can shorten it to something like

<do with="association_name_plural">

</do>

(note *no* additional punctuation inside the quotes; this says "call a method 
named association_name_plural on 'this'".

--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