Sha256: f280cf7d385d1b9441b9c03dc0dd3d6104be169836f18f1fec30c926ecdcd28f
Contents?: true
Size: 568 Bytes
Versions: 1
Compression:
Stored size: 568 Bytes
Contents
export default Ember.Route.extend({ model: function() { return this.store.createRecord('<%= require_name.singularize -%>'); }, deactivate: function() { var model = this.get('controller.model'); if (model.get('isNew')) { model.deleteRecord(); } }, actions: { save: function(model) { var _this = this; model.save().then(function() { _this.transitionTo('<%= file_name.pluralize -%>.show', model); }); }, cancel: function() { this.transitionTo('<%= file_name.pluralize -%>.index'); } } });
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ember-appkit-rails-0.5.0 | lib/generators/templates/scaffold/route/new.es6 |