Skip to content

Instantly share code, notes, and snippets.

@JemiloII
Last active August 29, 2015 14:05
Show Gist options
  • Save JemiloII/1a9ca8de79222bc2e46c to your computer and use it in GitHub Desktop.
Save JemiloII/1a9ca8de79222bc2e46c to your computer and use it in GitHub Desktop.
Showing Dafe_ my controller
App.Member = DS.Model.extend({
username: DS.attr('string'),
type: DS.attr('string'),
createdAt: DS.attr('date'),
updatedAt: DS.attr('date'),
});
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