Sha256: 84bbe40078655555a179438812a90d97d7bf1b2b623e4072dc61c8b5d8e4af6b
Contents?: true
Size: 508 Bytes
Versions: 1
Compression:
Stored size: 508 Bytes
Contents
module CanTango class CachedAbility < Ability # Equivalent to a CanCan Ability#initialize call # which executes all the permission logic def initialize candidate, options = {} raise "Candidate must be something!" if !candidate @candidate, @options = candidate, options return if cached_rules? clear_rules! permit_rules execute_engines! if engines_on? cache_rules! end def cached? true end def permit_rules end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cantango-0.9.3.2 | lib/cantango/cached_ability.rb |