Skip to content

Instantly share code, notes, and snippets.

@ecomba
Created September 5, 2012 19:34
Show Gist options
  • Save ecomba/3643179 to your computer and use it in GitHub Desktop.
Save ecomba/3643179 to your computer and use it in GitHub Desktop.
class Someclass < Struct.new(:listener)
def sign_up attributes
post '/sign-up', attributes,
success: ->(response) { listener.user_signed_up attributes.merge(response) },
error: ->(cause) {listener.error_signing_up_user cause}
end
...
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment