Last active
August 29, 2015 14:05
-
-
Save JemiloII/1a9ca8de79222bc2e46c to your computer and use it in GitHub Desktop.
Showing Dafe_ my controller
This file contains 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
App.Member = DS.Model.extend({ | |
username: DS.attr('string'), | |
type: DS.attr('string'), | |
createdAt: DS.attr('date'), | |
updatedAt: DS.attr('date'), | |
}); |
This file contains 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
App.MembersEditController = Ember.ObjectController.extend({ | |
types: [ | |
"Member", | |
"Creator", | |
"Producer", | |
"Moderator", | |
"Administer" | |
], | |
actions: { | |
update: function(params){ | |
this.store.update('member', {id: this.get('model.id'), username: this.get('model.username'), type: this.get('model.type')}).save(); | |
this.transitionToRoute('members.show', this.get('model.id')); | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment