Skip to content

Instantly share code, notes, and snippets.

@mrsimo
Created October 21, 2011 19:01
Show Gist options
  • Save mrsimo/1304646 to your computer and use it in GitHub Desktop.
Save mrsimo/1304646 to your computer and use it in GitHub Desktop.
# With a typical synchronous API
Api::User.exists?('mrsimo') # => true / false
# With an async API
exists = Api::User.exists?('mrsimo')
API.run_queue
exists.result # => true / false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment