Skip to content

Instantly share code, notes, and snippets.

@svasva
Created November 16, 2013 20:11
Show Gist options
  • Save svasva/7504718 to your computer and use it in GitHub Desktop.
Save svasva/7504718 to your computer and use it in GitHub Desktop.
Cx.ApplicationRoute = Ember.Route.extend
model: ->
Ember.RSVP.hash(
messages: @store.findAll 'message'
currencies: @store.findAll 'currency'
tradePairs: @store.findAll 'tradePair'
).then (m) -> m
setupController: (c, m) ->
@controllerFor('tradePairs').set 'model', m.tradePairs
@controllerFor('currencies').set 'model', m.currencies
user = @controllerFor('auth').get('content')
@send('loadUserData', user) if user
actions:
loadUserData: (user) ->
console.log 'loadUserData'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment