ruby on rails - accepts_nested_attributes_for and Active Resource -


I want to use accepts_nested_attributes_for with active resources Is it possible? I am using in the console and passing in nested attributes works, although nested models fail to make because foreigners are never set. For example,

For example, I have a user class that accepts for credentials: comes in the form of JSON

  "user" = & Gt; {"Name" = & gt; "Joe", "Credentials" = & gt; ["Username" = & gt; "Joe", "password" = & gt; "Password"]}  

, so I copied it to the console, but credential verification fails if user_id is never set.

Is there any way to do this?


Comments