Created
June 22, 2014 08:59
-
-
Save almaron/127dce6cab1aee9d9cdb to your computer and use it in GitHub Desktop.
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 User < ActiveRecord::Base | |
after_create :send_greeting | |
def send_greeting | |
SystemMessage.create(user_id: self.id, subject: t("messages.head.greeting"), text: render_to_string(partial:"messages/greeting", locals:{user:self})) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment