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

Version Path
cantango-0.9.4.7 lib/cantango/cached_ability.rb
cantango-0.9.4.6 lib/cantango/cached_ability.rb
cantango-0.9.4.5 lib/cantango/cached_ability.rb
cantango-0.9.4.3 lib/cantango/cached_ability.rb
cantango-0.9.4.2 lib/cantango/cached_ability.rb
cantango-0.9.4.1 lib/cantango/cached_ability.rb
cantango-0.9.4 lib/cantango/cached_ability.rb