Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 967a7cd79b
Fetching contributors…

Cannot retrieve contributors at this time

25 lines (19 sloc) 0.434 kb
module SessionsHelper
def sign_in(user)
cookies.permanent[:remember_token] = user.remember_token
current_user = user
end
def signed_in?
!current_user.nil?
end
def current_user=(user)
@current_user = user
end
def current_user
@current_user ||= User.find_by_remember_token(cookies[:remember_token])
end
def sign_out
current_user = nil
cookies.delete(:remember_token)
end
end
Jump to Line
Something went wrong with that request. Please try again.