Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

25 lines (19 sloc) 0.34 kb
helpers do
def logged_in?
User.get(session[:user_id])
end
def log_in(params)
user = User.authenticate(params)
user ? session[:user_id] = user.id : false
end
def log_out
session[:user_id] = nil
end
def current_user
if logged_in?
User.get(session[:user_id])
else
nil
end
end
end
Jump to Line
Something went wrong with that request. Please try again.