Module: Cms::Authentication::Controller

Defined in:
lib/cms/authentication/controller.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object

Inclusion hook to make #current_user and #logged_in? available as ActionView helper methods.



25
26
27
28
29
# File 'lib/cms/authentication/controller.rb', line 25

def self.included(base)
  base.send :helper_method, :current_user, :logged_in? if base.respond_to? :helper_method
  base.extend ClassMethods
  base.send :include, Cms::UsersService.controller_module
end