Frederick Cheung wrote: > On 6 Mar 2008, at 09:51, Daniel Van den oord wrote: > >> structure >> so I can't do the following: >> >> result = RestfullPerson.new(@person) >> >> I can't get any to_hash methods to work. any ideas are welcome > > I'm not 100% sure i've understood your question, but is > @person.attributes what you're after ? > > Fred
Thanks Fred. This is exactly what I was looking for. You might also want to point out that you can also do this @person.attributes.to_options! That will symbolize the keys, to make it look like the params[] field that is passed to the controller Kind Regards Hamza -- 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 -~----------~----~----~----~------~----~------~--~---

