Module: TamedBeast::Auth

Defined in:
lib/tamed_beast/auth.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/tamed_beast/auth.rb', line 2

def self.included(base)
	#base.class_eval do
		#def current_user
			##@current_user ||= ((session[:user_id] && User.find_by_id(session[:user_id])) || 0)
			#nil
		#end
		#ActionController::Base.helper_method :current_user
	#end

	protected
	def 
		if !current_user
			# redirect to login page
			false
		end
	end
end

Instance Method Details

#login_requiredObject



12
13
14
15
16
17
# File 'lib/tamed_beast/auth.rb', line 12

def 
	if !current_user
		# redirect to login page
		false
	end
end