Created
November 20, 2013 22:21
-
-
Save kenelliott/7572181 to your computer and use it in GitHub Desktop.
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.Router.map -> | |
@resource "teams", -> | |
@route "new" | |
@resource "team", path: "/:team_id", -> | |
@route "edit" | |
App.TeamEditRoute = Ember.Route.extend | |
model: -> | |
@modelFor "team" | |
renderTemplate: -> | |
@render "teams/edit" | |
App.TeamEditController = Ember.ObjectController.extend | |
actions: | |
save: -> | |
@content.save().then -> | |
@transitionToRoute "teams" | |
# AJAX PUT CONTENTS | |
# ids: [1] | |
# I am doing something wrong with this setup, perhaps the modelFor. | |
# I couldn't get params.team_id to work in the teamEditRoute model. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment