Created
April 25, 2013 20:59
-
-
Save mattjmorrison/5463125 to your computer and use it in GitHub Desktop.
Nice CoffeeScript refactor....
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Before | |
canModify: Ember.computed -> | |
value = false | |
description = @get('content.statusDescription') | |
if description is 'Unsent' or description is 'Do Not Send' | |
value = true | |
value | |
#After | |
canModify: Ember.computed -> | |
@get('content.statusDescription') in ['Unsent', 'Do Not Send'] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment