Handle MetaWhere and non-MetaWhere conditions correctly #631

Closed
wants to merge 1 commit into
from

Projects

None yet

1 participant

@andhapp
Collaborator
andhapp commented May 26, 2012

Just a bit of the background of the issue.

When there are multiple rules, CanCan does the sensible thing by merging them together. However, if one of the conditions is of type MetaWhere::Column, it fails. MetaWhere is intelligent enough to work with multiple conditions defined in any format whatsoever. So, this fix simply ensures that with multiple rules, where one of them is of type MetaWhere, CanCan doesn't merge them and just pass it on to MetaWhere.

@andhapp andhapp closed this May 26, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment