cours0708/P5B/ruby/3dossmanno_annuaire/app/models/user_observer.rb
2008-11-25 22:11:16 +01:00

12 lines
232 B
Ruby

class UserObserver < ActiveRecord::Observer
def after_create(user)
UserMailer.deliver_signup_notification(user)
end
def after_save(user)
UserMailer.deliver_activation(user) if user.recently_activated?
end
end