Sha256: dc4ca3bbf88b2c0d3e630dc94c8fa31300b393ddd4bfb6040d5a1e9d72e2ce23
Contents?: true
Size: 479 Bytes
Versions: 8
Compression:
Stored size: 479 Bytes
Contents
module CanTango module Users module UserAccount include CanTango::Users::Masquerade def active_user @active_user || user end def can? *args CanTango::Ability.new(self).can?(*args) end def cannot? *args CanTango::Ability.new(self).cannot?(*args) end def self.included(base) CanTango.config.user_accounts.register base.name.underscore.gsub(/_account$/, ''), base end end end end
Version data entries
8 entries across 8 versions & 1 rubygems