Notification refactoring

This commit is contained in:
Valery Sizov 2011-12-17 15:58:35 +02:00
parent f7859ec1ed
commit 7713f7fefb
7 changed files with 55 additions and 28 deletions

View file

@ -1,5 +1,6 @@
class ApplicationController < ActionController::Base
before_filter :authenticate_user!
before_filter :set_current_user_for_mailer
protect_from_forgery
helper_method :abilities, :can?
@ -19,6 +20,10 @@ class ApplicationController < ActionController::Base
end
end
def set_current_user_for_mailer
MailerObserver.current_user = current_user
end
def abilities
@abilities ||= Six.new
end