lib/fume/authlogic.rb in fume-0.5.3 vs lib/fume/authlogic.rb in fume-0.6.0

- old
+ new

@@ -1,15 +1,20 @@ module Fume module Authlogic def self.try_enable if defined? ::Authlogic - ActionController::Base.send :include, ControllerExtensions::InstanceMethods - ActionController::Base.send :helper_method, :current_user_session, :current_user + ActionController::Base.send :include, ControllerExtensions end end module ControllerExtensions + extend ActiveSupport::Concern + + included do + helper_method :current_user_session, :current_user + end + module InstanceMethods protected def current_user_session return @current_user_session if defined?(@current_user_session) @@ -18,9 +23,10 @@ def current_user return @current_user if defined?(@current_user) @current_user = current_user_session && current_user_session.user end + end end end end