Skip to content

Instantly share code, notes, and snippets.

@cloke
Created November 5, 2014 21:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cloke/fbfff95294d290ec8e90 to your computer and use it in GitHub Desktop.
Save cloke/fbfff95294d290ec8e90 to your computer and use it in GitHub Desktop.
executions: ( ->
ids = @get 'execution_ids'
return unless ids? and ids.length
_ids = @get '_ids'
# Prevent multiple calls to server for no reason.
return @get('_executions') if _ids && ids.toString() == _ids.toString()
@set '_ids', ids
_executions = @get('store').find 'execution',
ids: ids
limit: ids.length
sort: 'display_name'
@set '_executions', _executions
_executions
).property 'execution_ids'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment