impress/app/controllers/application_controller.rb

20 lines
319 B
Ruby
Raw Normal View History

2010-05-14 15:12:31 -07:00
class ApplicationController < ActionController::Base
protect_from_forgery
2010-10-18 14:58:45 -07:00
helper_method :current_user, :user_signed_in?
protected
def current_user
@current_user ||= warden.authenticate
end
def user_signed_in?
current_user ? true : false
end
def warden
env['warden']
end
2010-05-14 15:12:31 -07:00
end