You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I understand that the intentional behaviour for scopeless initial conditions is: "if you call or on a condition-less scope, it will be ignored", but I would say that is unexpected.
Imagine a scope that is sometimes pre-filtered (by CanCan in our case) for customers, but unfiltered for internal users. We want to show customers their products, and also offers. Here is our one line controller action. CanCan has provided products.
products = products.or.offers
This works for customers, but internal users can only see offers, as the initial scope is unfiltered and therefore dropped. I'd say this was unexpected...?
The text was updated successfully, but these errors were encountered:
I understand that the intentional behaviour for scopeless initial conditions is: "if you call or on a condition-less scope, it will be ignored", but I would say that is unexpected.
Imagine a scope that is sometimes pre-filtered (by CanCan in our case) for customers, but unfiltered for internal users. We want to show customers their products, and also offers. Here is our one line controller action. CanCan has provided products.
This works for customers, but internal users can only see offers, as the initial scope is unfiltered and therefore dropped. I'd say this was unexpected...?
The text was updated successfully, but these errors were encountered: