views:

46

answers:

1

I am using attribute_fu with rails 2.2 and I would like to treat the first nested element differently than the rest, meaning I would like to render a different partial or pass a parameter to the existing partial.

Is that possible ?

Thanks, Cezar

+1  A: 

I found the answer to my own question !

For those running into the same problem: you can pass a locals hash like you would pass it to a normal render :partial like so :

<%= f.render_associated_form(@your_model, :locals => {:var => value}) %>

Regards, Cezar

Cezar