-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
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
Rails 6 fixes #951
Rails 6 fixes #951
Conversation
… is deprecated and will be removed from Rails 6.1
with Rails 6 it doesn't work, see travis.ci logs. |
Fix/specs for rails 6
@igorkasyanchuk fixed! |
great! |
Nice work! |
We need to poing out in the changelog before pushing a new version out. |
+1 |
can we also update the validator in
This will address the deprecation warning: |
@gkubaryk i don't think tags should be case_sensitive. |
@seuros i have no strong opinion either way; the important thing (to me) is to set it to something so that the behavior is defined moving forward. the deprecation warning implied to me that it's silently been acting case sensitive and no longer will in the future. if you have a different reading of it or if we should take the opportunity to explicitly set it false, no argument here. :) |
Pretty sure the default is case sensitive false |
if Rails.version < "6.0.0.beta1" | ||
set_attribute_was('#{tag_type}_list', #{tag_type}_list) | ||
else | ||
duplicated_mutations_from_database.change_to_attribute('#{tag_type}_list') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure this is even working? I get the same result without it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Rails version check needs to be fixed to work with the official Rails 6 release.
I made a PR for this: spark-solutions#2
For anyone on Rails 6 and as long as this PR isn't updated, here is a working solution: https://github.com/tbuehl/acts-as-taggable-on/tree/fix/rails-6-and-failing-specs |
use Gem::Version object to compare rails version instead of string
use Gem::Version object instead of string in specs
@@ -11,5 +11,5 @@ appraise 'activerecord-5.0' do | |||
end | |||
|
|||
appraise 'activerecord-6.0' do | |||
gem 'activerecord', "~> 6.0.0.beta1" | |||
gem 'activerecord', "~> 6.0.0.rc1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@damianlegawiec - thanks for the MR contribution!
Should this be bumped to 6.0.0
instead of 6.0.0.rc1
? https://rubygems.org/gems/activerecord/versions/6.0.0
@@ -2,16 +2,18 @@ | |||
|
|||
source "https://rubygems.org" | |||
|
|||
gem "activerecord", "~> 6.0.0.beta1" | |||
gem "activerecord", "~> 6.0.0.rc1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@damianlegawiec - dupe comment...
Should this be bumped to 6.0.0
instead of 6.0.0.rc1
? https://rubygems.org/gems/activerecord/versions/6.0.0
@@ -18,6 +18,7 @@ | |||
end | |||
|
|||
it 'should show changes of freshly initialized dirty object' do | |||
pending if Gem.loaded_specs["rails"].version >= Gem::Version.new("6.0.0.beta1") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@damianlegawiec - one last one
Should this be bumped to 6.0.0
instead of 6.0.0.beta1
?
Since acts-as-taggable-on still doesn't support Rails 6.0 we will drop dependency on it and we'll release an extension later providing those featues. mbleigh/acts-as-taggable-on#951
I changed the core.rb file to:
and it works !!! |
I'm wondering if there's an official fix for this issue? This is generating a lot of deprecation warnings. |
close mbleigh#951 fixes mbleigh#953 files mbleigh#961
We're using gem version 6.5.0 and we're seeing a lot of the deprecation warnings about the uniqueness validator. |
Please change to |
No description provided.