what you see in the params is not the Check object but it's string representation. There is no sane way to get the actual object out of this. I guess what you want is to pass the id of the check object and not the object itself.
<%= hidden_field_tag "checks", @c.id %> and in the controller def create @check = Check.find(params[:checks]) end -- pascal On Feb 8, 9:20 am, Srikanth Jeeva <li...@ruby-forum.com> wrote: > 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 viahttp://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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.