Hi Marnen,
How can I pass the the whole object in link_to?
For instance, if I have a child object with first_name and last_name as
attributes, then I need to pass the child object as a hash.
Right now, what is working for me is this:
<%= link_to 'Create PDF', { :controller => 'children', :action =>
'show', :format => :pdf, :first_name => @child.first_name, :last_name =>
@child.last_name } %>
And, I want to do something like this (but it's not working):
<%= link_to 'Create PDF', { :controller => 'children', :action =>
'show', :format => :pdf, :child => @child } %>
--
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.