import Ember from 'ember'; const {service} = Ember.inject; export default Ember.Controller.extend({ session: service('session'), sessionAccount: service('session-account'), actions: { editCompany: function() { this.set('isEditing', true); }, saveCompany: function() { 'use strict'; this.set('isEditing', false); var model = this.get('model'); model.save() .catch(function(err) { console.error(err); }); }, cancelEdit: function() { 'use strict'; var model = this.get('model'); model.rollbackAttributes(); this.set('isEditing', false); } } });