I have a ember route that uses a date parameter to retrieve a collection of events. I am using the deserialize function to fetch the collection. After the collection is fetched the url changes from "/day/2012-10-08" to "/day/undefined".
The events include a range of dates so I can't use the data to serialize the date parameter. Instead I should be able to return the params on the url. My example below sets an attribute on the router "current_params" on deserialize and returns it on serialize. I am wondering if there is access to the params in the serialize method.
day: Ember.Route.extend
route: "/day/:date"
deserialize: (router, params) ->
router.set('current_params', params)
router.get('store').findQuery( App.Event, { date: params.date } )
serialize: (router, context) ->
router.get('current_params')
connectOutlets: (router, context) ->
router.get('applicationController').connectOutlet( 'timecard', context )