Sha256: 14264bdd0edaa0216d11849ccb053bc85ad68124d7405d456625659fcd8fae07
Contents?: true
Size: 561 Bytes
Versions: 2
Compression:
Stored size: 561 Bytes
Contents
module CanTango module Ability class Cached < Base # 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 end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
cantango-core-0.1.1 | lib/cantango/ability/cached.rb |
cantango-core-0.1.0 | lib/cantango/ability/cached.rb |