Skip to content

Instantly share code, notes, and snippets.

@mattboldt
Created June 9, 2014 17:43
Show Gist options
  • Save mattboldt/1ffc0ecf855bb1b1685e to your computer and use it in GitHub Desktop.
Save mattboldt/1ffc0ecf855bb1b1685e to your computer and use it in GitHub Desktop.
# 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