Skip to content

Instantly share code, notes, and snippets.

@kenelliott
Created November 20, 2013 22:21
Show Gist options
  • Save kenelliott/7572181 to your computer and use it in GitHub Desktop.
Save kenelliott/7572181 to your computer and use it in GitHub Desktop.
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