Sha256: ace9e5526d176ad74a1ecc5f89e97974bd6ff4ed631dfe617915162c518e8e5c

Contents?: true

Size: 423 Bytes

Versions: 6

Compression:

Stored size: 423 Bytes

Contents

export default Ember.Route.extend({
  model: function(params) {
    return this.store.find('<%= file_name.singularize -%>', params.<%= file_name.singularize -%>_id);
  },
  actions: {
    destroyRecord: function() {
      var model = this.get('controller.model');
      var _this = this;
      model.destroyRecord().then(function() {
        _this.transitionTo('<%= file_name.pluralize -%>.index');
      });
    }
  }
});

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ember-appkit-rails-0.3.2 lib/generators/templates/scaffold/route/show.js.es6
ember-appkit-rails-0.3.1 lib/generators/templates/scaffold/route/show.js.es6
ember-appkit-rails-0.3.0 lib/generators/templates/scaffold/route/show.js.es6
ember-appkit-rails-0.2.2 lib/generators/templates/scaffold/route/show.js.es6
ember-appkit-rails-0.2.1 lib/generators/templates/scaffold/route/show.js.es6
ember-appkit-rails-0.2.0 lib/generators/templates/scaffold/route/show.js.es6