Created
July 18, 2012 11:59
-
-
Save Zhomart/3135782 to your computer and use it in GitHub Desktop.
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 | |
# here use after create callback | |
# http://api.rubyonrails.org/classes/ActiveRecord/Callbacks.html | |
after_create :create_facebookdata | |
def create_facebookdata | |
# do some stuff here | |
self.facebookdata = Facebookdata.new | |
self.facebookdata.save! | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment