Sha256: 68ec9537e413054d5f928aff99cdd8a56a05a5894f63cde546d403af92b6d569
Contents?: true
Size: 659 Bytes
Versions: 6
Compression:
Stored size: 659 Bytes
Contents
export default Ember.Route.extend({ model: function(params) { return this.store.find('<%= file_name.singularize -%>', params.<%= file_name.singularize -%>_id); }, deactivate: function() { var model = this.get('controller.model'); model.rollback(); }, actions: { save: function() { var model = this.get('controller.model'); var _this = this; model.save().then(function() { _this.transitionTo('<%= file_name.pluralize -%>.show', model); }); }, cancel: function() { var model = this.get('controller.model'); this.transitionTo('<%= file_name.pluralize -%>.show', model); } } });
Version data entries
6 entries across 6 versions & 1 rubygems