[Rails] Passing Object in params, and parse.
Hi,
Im passing an object as follows.
Controller:
def new
@c = Check.first
end
View:
<form action="create" method="post">
<%= hidden_field_tag "checks", @c %>
<%= submit_tag "submit" %>
</form>
The params i get in create method is,
{"checks"=>"#<Check:0xa2c3134>", "commit"=>"submit"}
Any idea how to parse "#<Check:0xa2c3134>" and take all the data?
Thanks,
Srikanth J
--
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home