cours0708/P5B/ruby/3dossmanno_annuaire/app/models/user_observer.rb

12 lines
232 B
Ruby
Raw Normal View History

2008-11-25 21:11:16 +00:00
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