Skip to content

Instantly share code, notes, and snippets.

@Chandler
Last active December 20, 2015 21:39
Show Gist options
  • Save Chandler/6199275 to your computer and use it in GitHub Desktop.
Save Chandler/6199275 to your computer and use it in GitHub Desktop.
OrganizationRoute = Em.Route.extend
model: (params) ->
Organization.find(params.organization_id)
#visiting /orgs/5/settings renders the "organization" template, and the "organziation.settings" template
#in the "organization" template and OrganizationController context, I have access to the model setup above.
#in the "organziations.settings" template and OrganiationSettingsController context I have no model
--
#I can setup a model in OrganizationsSettingsRoute like this:
OrganizationSettingsRoute = Em.Route.extend
model: (params) ->
Organization.find(params.organization_id)
#but params doesn't get passed into this route, it only gets passed into OrganizationRoute
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment