Created
June 9, 2014 17:43
-
-
Save mattboldt/1ffc0ecf855bb1b1685e 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
# ember router | |
App.Router.reopen | |
location: 'history' | |
rootURL: '/u/' | |
App.Router.map -> | |
@route 'login' | |
@resource('documents', path: '/') | |
@route('new') | |
@resource('document', path: '/:document_id') | |
App.DocumentsRoute = Ember.Route.extend | |
model: -> | |
@store.find('document') | |
# Rails router | |
namespace :api do | |
resources :documents do | |
resources :pages, controller: 'documents/pages', trailing_slash: false | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment