Skip to content

Instantly share code, notes, and snippets.

@bj-mcduck
Created April 8, 2014 14:57
Show Gist options
  • Save bj-mcduck/10137795 to your computer and use it in GitHub Desktop.
Save bj-mcduck/10137795 to your computer and use it in GitHub Desktop.
# Show Route
App.DreamSymbolsShowRoute = Ember.Route.extend
model: (params)->
self = @
@store.find('dream_symbol', params.id).then (symbol)->
Ember.RSVP.hash
symbol: symbol
siblings: self.store.findByIds 'dream_symbol', symbol.siblings
setupController: (controller, model)->
controller.set 'model', model.symbol
controller.set 'siblings', model.siblings
actions:
edit: ->
@transitionTo 'dream_symbols.edit', @currentModel
%h1
= hb 'name'
%small
%btn.btn.btn-default.btn-xls{ _action: 'edit' }
%i.fa.fa-pencil
%p= hb 'description'
= hb 'each siblings' do
My Brother
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment