if you name your partial

partials/rows/asset

then you can use
:object => Asset.new


instead of :locals => ...


On Wed, Feb 2, 2011 at 11:22 AM, Edward Stembler <[email protected]> wrote:
> Edward Stembler wrote in post #979228:
>> Now I need to figure out how to get it working with jQuery since I’m not
>> using Prototype…
>
> Here’s how I got it to work using jQuery:
>
> <%=link_to_function '', "$('#asset_rows').append('#{escape_javascript
> render(:partial => 'partials/asset_row', :locals => {:asset =>
> Asset.new})}')", :title => 'Add Attachment', :class => 'add_child' %>
>
> Now on to the “remove” button...
>
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Ruby on Rails: Talk" 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/rubyonrails-talk?hl=en.
>
>



-- 
make haste slowly \
festina lente  \
-
mobile  +1_415_632_6001
[email protected]
http://robotarmyma.de

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" 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/rubyonrails-talk?hl=en.

Reply via email to