1 2 3 4 5 6 7 8 9
helpers do def current_user if session[:session] @current_user ||= User[:session => session[:session]] else nil end end end