Last active
April 18, 2016 14:30
-
-
Save kid/41c59c8d55a3cf395e48d712545443cd to your computer and use it in GitHub Desktop.
This file contains hidden or 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
search (term) -> | |
if Ember.isBlank(term) | |
[] | |
else | |
@get('store') | |
.query('theme', { filter: { 'pref-label': term } }) | |
.then (result) -> | |
result.push('Create object: blabla') | |
result |
This file contains hidden or 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
search(function(term) { | |
if (Ember.isBlank(term)) { | |
return []; | |
} else { | |
return this.get('store').query('theme', { | |
filter: { | |
'pref-label': term | |
} | |
}).then(function(result) { | |
result.push('Create object: blabla'); | |
return result; | |
}); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment