On 04 Nov 2011, at 16:24, Peter De Berdt wrote:

You can then just pass in a json hash to the constructor:

CustomModel.new(params)

where params is a json hash like {name: "John Doe", id: 123, description: "Some anonymous man", some_integer: 5}

I stand corrected, where params is a normal Ruby hash (my weekend has started, my mind is slowing down ;-))


Best regards

Peter De Berdt

--
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