Created
April 26, 2018 14:12
-
-
Save bsylvain/541a37c0f7a0b85f9de3399d3d9ccca2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Ember from 'ember'; | |
| export default Ember.Route.extend({ | |
| model() { | |
| return this.get('store').createRecord('licence'); | |
| }, | |
| actions: { | |
| saveLicence(newLicence) { | |
| newLicence.save().then(() => this.transitionTo('licences')); | |
| }, | |
| //built in ember action called when leaving a page | |
| willTransition() { | |
| this.controller.get('model').rollbackAttributes(); | |
| } | |
| } | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Assertion Failed: An action named 'saveLicence' was not found in <marketadmin@controller:licences/new::ember443> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment