Skip to content

Instantly share code, notes, and snippets.

@lukegalea
Forked from stevekane/gist:5513628
Created May 3, 2013 20:25
Show Gist options
  • Save lukegalea/5513745 to your computer and use it in GitHub Desktop.
Save lukegalea/5513745 to your computer and use it in GitHub Desktop.
App.Route.map () ->
@resource "clients", ->
@resource "client"
@resource 'coaches', ->
@resource 'coach', path: ':coach_id', ->
@resource 'coachedclients', path: '/clients'
App.Coachedclients = Ember.Route.extend
model: (params) ->
return App.Client.find(coach: @modelFor('coach'))
setupController: (controller, model) ->
@controllerFor("clients").set('content', model)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment