'use strict'; import Ember from 'ember'; const { service } = Ember.inject; export default Ember.Controller.extend({ session: service('session'), sessionAccount: service('session-account'), genders: [{g: 'Male', id: 0}, {g: 'Female', id: 1}], actions: { editProfile: function() { this.set('isEditing', true); }, saveProfile: function() { var model = this.get('model'); this.set('sessionAccount.account.forename', model.get('forename')); this.model.save() .catch(function(err) { console.error(err); }); this.set('isEditing', false); } } });