We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set my Gemfile to this:
gem "cancancan", git: "https://github.com/CanCanCommunity/cancancan.git" gem "rails", "6.1.0.rc2"
It shouldn't raise an error.
This error is being raised:
undefined method `resolve_column_aliases' for #<ActiveRecord::PredicateBuilder:0x000055e74c4bfb70> /home/dev/.rvm/gems/ruby-2.6.6/bundler/gems/cancancan-d284e87464a3/lib/cancan/model_adapters/active_record_5_adapter.rb:49:in `sanitize_sql_activerecord5' /home/dev/.rvm/gems/ruby-2.6.6/bundler/gems/cancancan-d284e87464a3/lib/cancan/model_adapters/active_record_5_adapter.rb:38:in `sanitize_sql' /home/dev/.rvm/gems/ruby-2.6.6/bundler/gems/cancancan-d284e87464a3/lib/cancan/model_adapters/active_record_adapter.rb:115:in `merge_non_empty_conditions' /home/dev/.rvm/gems/ruby-2.6.6/bundler/gems/cancancan-d284e87464a3/lib/cancan/model_adapters/active_record_adapter.rb:110:in `merge_conditions' /home/dev/.rvm/gems/ruby-2.6.6/bundler/gems/cancancan-d284e87464a3/lib/cancan/model_adapters/active_record_adapter.rb:49:in `block in extract_multiple_conditions' /home/dev/.rvm/gems/ruby-2.6.6/bundler/gems/cancancan-d284e87464a3/lib/cancan/model_adapters/active_record_adapter.rb:48:in `each' /home/dev/.rvm/gems/ruby-2.6.6/bundler/gems/cancancan-d284e87464a3/lib/cancan/model_adapters/active_record_adapter.rb:48:in `inject' /home/dev/.rvm/gems/ruby-2.6.6/bundler/gems/cancancan-d284e87464a3/lib/cancan/model_adapters/active_record_adapter.rb:48:in `extract_multiple_conditions' /home/dev/.rvm/gems/ruby-2.6.6/bundler/gems/cancancan-d284e87464a3/lib/cancan/model_adapters/active_record_adapter.rb:43:in `conditions' /home/dev/.rvm/gems/ruby-2.6.6/bundler/gems/cancancan-d284e87464a3/lib/cancan/model_adapters/active_record_adapter.rb:57:in `database_records' /home/dev/.rvm/gems/ruby-2.6.6/bundler/gems/cancancan-d284e87464a3/lib/cancan/model_additions.rb:24:in `accessible_by'
Rails version: 6.1.0.rc2
Ruby version: 2.6.6
CanCanCan version Current master on Github
The text was updated successfully, but these errors were encountered:
Rails 6.1 is been released
Sorry, something went wrong.
From what I can tell the method resolve_column_aliases of PredicateBuilder has been removed by this commit in rails. CanCanCan uses it here.
resolve_column_aliases
PredicateBuilder
It should be possible to skip Lines 49-52 for Rails 6.1 as the new implementation of build_from_hash does this by default now.
build_from_hash
I'm not sure how you want to make the differentiation to the new Rails Version, but I could provide a PR if needed.
closed in cancancan 3.2.0
Update cancancan Gem to 3.2
cancancan
91f6bae
To pick up support for Rails 6.1 - https://github.com/CanCanCommunity/cancancan/blob/develop/CHANGELOG.md#320 - CanCanCommunity/cancancan#666
No branches or pull requests
Steps to reproduce
Set my Gemfile to this:
Expected behavior
It shouldn't raise an error.
Actual behavior
This error is being raised:
System configuration
Rails version: 6.1.0.rc2
Ruby version: 2.6.6
CanCanCan version Current master on Github
The text was updated successfully, but these errors were encountered: