Sha256: db1584b5397fdf3f1f19de90d1c500576428f7a0b094c3d616b5bec35c93e251
Contents?: true
Size: 412 Bytes
Versions: 22
Compression:
Stored size: 412 Bytes
Contents
module CanTango module Users module Masquerade attr_reader :masquerading def masquerade_as user @masquerading = true user = user.kind_of?(String) ? ::User.find(user) : user @active_user = user end def stop_masquerade @active_user, @masquerading = nil, nil end def masquerading? !@masquerading.nil? end end end end
Version data entries
22 entries across 22 versions & 1 rubygems