KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Say you have two Rails models with association: class Foo < ActiveRecord::Base attr_accessible :name belongs_to :moo end class Moo < ActiveRecord::Base attr_accessible :name has_many :foos accepts_nested_attributes_for :foos end Thanks to ActiveModel::Serializer it is easy to send existing nested objects from Rails to Ember.js. But I can't find a way to create such nested objects in Ember and send them back to Rails for persistence. My understanding is Ember needs to send back something like: "moo"=> { "foos_attributes"=>{"0"=>{"name" => ...}}, "name" => ... } Is there a "standard" way to do that? I have seen a few "old" questions on this subject but no real solution, and since Ember has been changing so much I thought there might be a simple way to do it now (without changing the Rest Adapter itself). Thanks a lot, PJ
Tags (comma-separated)
Save Edits
Cancel