Module: CanCan::RuleExtensions
- Included in:
- Rule
- Defined in:
- lib/cancan/eager_load/rule_extensions.rb
Instance Method Summary collapse
Instance Method Details
#matches_non_block_conditions(subject) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/cancan/eager_load/rule_extensions.rb', line 7 def matches_non_block_conditions(subject) if @conditions.is_a?(Hash) return nested_subject_matches_conditions?(subject) if subject.class == Hash unless subject_class?(subject) subject.includes(conditions_to_includes(@conditions)) if subject.is_a?(ActiveRecord::Base) return matches_conditions_hash?(subject) end end # Don't stop at "cannot" definitions when there are conditions. conditions_empty? ? true : @base_behavior end |