Created
November 16, 2011 05:02
-
-
Save bradylove/1369298 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ApplicationController < ActionController::Base | |
# force_ssl | |
protect_from_forgery | |
helper_method :current_user | |
def signed_in | |
@signed_in = true unless session[:user_id] == nil | |
end | |
private | |
def current_user | |
@current_user ||= User.where(:id => :session[:user_id]).first if session[:user_id] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment