Skip to content

Instantly share code, notes, and snippets.

@brian428
Created October 3, 2012 05:08
Show Gist options
  • Save brian428/3825132 to your computer and use it in GitHub Desktop.
Save brian428/3825132 to your computer and use it in GitHub Desktop.
# Common way of making async call via underlying Store
loadCompanies: ->
@companyService.loadCompanies(
callback: ( records, operation, success ) ->
if( success )
# Do something with results
else
# Do something with the error
# Do something whether the call succeeded or failed
)
# CompanyService method using Store
loadCompanies: ( config ) ->
@companyStore.load(
callback: config.callback
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment