Notification refactoring
This commit is contained in:
parent
f7859ec1ed
commit
7713f7fefb
7 changed files with 55 additions and 28 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue