Last active
December 20, 2015 21:39
-
-
Save Chandler/6199275 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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