Skip to content
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.

Do Not Execute Scope When Checking Class Rule #971

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Dec 8, 2013

  1. Do not execute the scope condition on class permission checks.

    @conditions.empty? calls ActiveRecord::Relation#empty? when a scoped condition is provided. ActiveRecord::Relation#empty? will query the database while CanCan only needs to check if conditions are set on the rule.
    matt-glover committed Dec 8, 2013
    Configuration menu
    Copy the full SHA
    b7d1c6d View commit details
    Browse the repository at this point in the history