Module: Huberry::Authentication::ControllerMethods

Defined in:
lib/huberry/authentication/controller_methods.rb

Defined Under Namespace

Modules: InstanceMethods

Class Method Summary collapse

Class Method Details

.extended(base) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/huberry/authentication/controller_methods.rb', line 4

def self.extended(base)
	base.class_eval do
		include InstanceMethods

		cattr_accessor :authentication_model, :unauthenticated_message, :unauthenticated_redirect_path
		self.authentication_model = 'User'
		self.unauthenticated_message = 'Login to continue'
		self.unauthenticated_redirect_path = '/'

		attr_accessor :current_user
		helper_method :current_user, :logged_in?
	end
end