Sha256: c11aaad462f06f8d9878542151c8e1c6801a4e30749165f79f1bb57e9f3bd368
Contents?: true
Size: 374 Bytes
Versions: 32
Compression:
Stored size: 374 Bytes
Contents
class UserSessionsController < ApplicationController # toggle to set superuser_mode in session # Only allows user who can be superusers to set this value in session def superuser if session[:superuser_mode] session[:superuser_mode] = nil elsif current_user.can_be_superuser? session[:superuser_mode] = true end redirect_to :back end end
Version data entries
32 entries across 32 versions & 1 rubygems