Sha256: 34070961154010cc27c2ea5eee82d44b46309a8d57dd14bb22ce256418aada65
Contents?: true
Size: 513 Bytes
Versions: 7
Compression:
Stored size: 513 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
7 entries across 7 versions & 1 rubygems