import Ember from 'ember';

export default Ember.Route.extend({
  model: function() {
    return this.store.createRecord('runscript');
  },
  actions: {
    cancel: function() {
      this.transitionTo('runscripts');
    },

    save: function(runscript) {
      console.log(runscript.get("name"));
      runscript.save();
    }
  }
});

import Ember from 'ember';

export default Ember.Route.extend({
  model: function() {
    return Ember.Object.create();
  },

  actions: {
    cancel: function() {
      this.transitionTo('runscripts');
    },

    save: function(form) {
      var runscript = this.store.createRecord('runscript', {
        name: form.get('name'),
        script: form.get('script')
      });

      runscript.save();
    }
  }
});

Use an Ember.Object as model
frontend: Use an Ember.Object as model
