Created
April 14, 2014 17:24
-
-
Save laser/10667267 to your computer and use it in GitHub Desktop.
00: UserModel
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_added | |
validates :email, uniqueness: true | |
def notify_added | |
UserMailer.email(self).deliver | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment