Skip to content

Instantly share code, notes, and snippets.

@enyo
Created December 26, 2012 15:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save enyo/4380984 to your computer and use it in GitHub Desktop.
Save enyo/4380984 to your computer and use it in GitHub Desktop.
App.Router = Ember.Router.extend
enableLogging: yes
showFinancialTransfers: Ember.State.transitionTo "finances"
root: Ember.Route.extend
index: Ember.Route.extend
route: "/"
redirectsTo: "finances"
finances: Ember.Route.extend
route: "/finances"
showEvent: Ember.State.transitionTo "finances.event"
enter: -> App.store.findAll App.FinancialEvent
connectOutlets: (router) ->
router.get("applicationController").connectOutlet "finances"
index: Ember.Route.extend
route: "/"
connectOutlets: (router) ->
router.get("financesController").connectOutlet "listFinancialEvents", App.FinancialEvent.all()
event: Ember.Route.extend
route: "/:id"
connectOutlets: (router, event) ->
router.get("financesController").connectOutlet "listFinancialEvents", App.FinancialEvent.all()
router.get("listFinancialEventsController").connectOutlet "showFinancialEvent", event
deserialize: (router, context) ->
App.store.find App.FinancialEvent, context.id
index: Ember.Route.extend
route: "/"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment