Created
February 3, 2016 12:01
-
-
Save mktakuya/ae5afdc659335a83e179 to your computer and use it in GitHub Desktop.
ActiveRecord::Callbacksのサンプル
This file contains 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 Like < ActiveRecord::Base | |
after_save :send_email_notification | |
after_save :send_facebook_notification | |
def send_mail_notification | |
# メール送信の処理 | |
end | |
def send_facebook_notification | |
# facebook通知の処理 | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment