Skip to content

Instantly share code, notes, and snippets.

@jakecraige
Created April 23, 2014 22:56
Show Gist options
  • Save jakecraige/11235380 to your computer and use it in GitHub Desktop.
Save jakecraige/11235380 to your computer and use it in GitHub Desktop.
ProjectsController = Ember.ArrayController.extend
readyForDesign: Em.computed.filterBy('model', 'activePhase', 'ready_for_design')
design: Em.computed.filterBy('model', 'activePhase', 'design')
readyForDevelopment: Em.computed.filterBy('model', 'activePhase', 'ready_for_development')
development: Em.computed.filterBy('model', 'activePhase', 'development')
qualityAssurance: Em.computed.filterBy('model', 'activePhase', 'quality_assurance')
onHold: Em.computed.filterBy('model', 'activePhase', 'on_hold')
completed: Em.computed.filterBy('model', 'activePhase', 'completed')
overdue: Em.computed.filterBy('model', 'dueString', 'overdue')
today: Em.computed.filterBy('model', 'dueString', 'today')
thisWeek: Em.computed.filterBy('model', 'dueString', 'this-week')
thisMonth: Em.computed.filterBy('model', 'dueString', 'this-month')
thirtyPlus: Em.computed.filterBy('model', 'dueString', 'thirty-plus')
app: Em.computed.filterBy('model', 'type', 'app')
web: Em.computed.filterBy('model', 'type', 'web')
media: Em.computed.filterBy('model', 'type', 'media')
`export default ProjectsController;`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment