lib/authenticated_system.rb
# Set session to another user.  Only available to admins
Set session to another user.  Only available to admins
Set session to another user . Only available to admins
def assume_user(new_user)
      return unless current_user && current_user.admin? && !new_user.admin?
      session[:admin_id] = current_user.id
      UserSession.create(new_user, true)
    end
def assume_user ( new_user ) return unless current_user && current_user . admin? && ! new_user . admin? session [ :admin_id ] = current_user . id UserSession . create ( new_user , true ) end
Set session to another user.
Set session to another user .
new_user