Fix to handle MetaWhere and non-MetaWhere conditions correctly. #632

Merged
merged 1 commit into from May 29, 2012

Projects

None yet

2 participants

@andhapp
Collaborator

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::Column, CanCan doesn't merge them and just pass it on to MetaWhere.

@andhapp
Collaborator

@ryanb: Hey, can you please review? Thanks.

@ryanb ryanb merged commit 80a8c39 into ryanb:master May 29, 2012
@mshibuya mshibuya added a commit to sferik/rails_admin that referenced this pull request Jul 3, 2012
@mshibuya mshibuya Temporarily lock cancan to 1.6.7
because 1.6.8 has a problem with handling of cannot directive, which was brought in by ryanb/cancan#632
30e3cef
@themgt themgt added a commit to themgt/rails_admin that referenced this pull request Jul 18, 2012
@mshibuya mshibuya Temporarily lock cancan to 1.6.7
because 1.6.8 has a problem with handling of cannot directive, which was brought in by ryanb/cancan#632
381f5d6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment