Created
March 4, 2013 22:56
-
-
Save Breefield/5086425 to your computer and use it in GitHub Desktop.
Way 1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class User < ActiveRecord::Base | |
after_create :notify_user_created | |
def notify_user_created | |
User.delay.async_notify_user_created(self.id) | |
end | |
def self.async_notify_user_created(id) | |
user = User.find(id) | |
user.do_the_think_you_were_going_to_do | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment