Following the example listed here:
I’m getting an error whenever I create new records using this.get(‘model’) rather than mapping out each key value pair.
The error is:
Assertion failed: Cannot clone an Ember.Object that does not implement Ember.Copyable
Any thoughts on what could be the cause here? I love the idea of using this.get(‘model’) as it seems pretty elegant in crud scenarios. If I can just extract the record data that would also be splendid.
UsersCreateController = Em.ObjectController.extend actions: save: -> self = @ user = @get 'model' user.set 'creationDate', new Date() newUser = @store.createRecord 'user', user newUser .save() .then (model)-> self.transitionToRoute 'user', newUser `export default UsersCreateController`