Sha256: f00c7a4630f8da81315cc0aeb571aee689e887cc24fd7338a986e04bfe50a2b8
Contents?: true
Size: 304 Bytes
Versions: 15
Compression:
Stored size: 304 Bytes
Contents
module Minimalist module TestHelper # Sets the current user in the session from the user fixtures. def login_as(user) @request.session[:user_id] = user ? users(user).id : nil end def current_user @current_user ||= User.find(@request.session[:user_id]) end end end
Version data entries
15 entries across 15 versions & 1 rubygems