Skip to content
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

Change the deprecation for Enumerating ActiveModel::Errors to Rails 6.1 instead of 6.0 #36087

Conversation

abhaynikam
Copy link
Contributor

While looking at PR #32313 I found the deprecation message was added for Rails 6.0 but this was merged as part of Rails 6.1. This caught my attention so raised PR immediately instead of waiting.

I do not have a lot of context about this change so let me know if this is incorrect.

cc/ @lulalala @rafaelfranca

@@ -231,17 +231,17 @@ def each(&block)
else
ActiveSupport::Deprecation.warn(<<-MSG.squish)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this message expects new line as a structure, squish isn't matched in that case.
Can you change squish to squiggly heredoc?

Suggested change
ActiveSupport::Deprecation.warn(<<-MSG.squish)
ActiveSupport::Deprecation.warn(<<~MSG)

@abhaynikam abhaynikam force-pushed the 32313-change-the-rails-version-in-deprecation-message branch from c18bd21 to e6daff1 Compare April 25, 2019 03:23
@kamipo
Copy link
Member

kamipo commented Apr 25, 2019

Can you update this line too?

def deprecation_removal_warning(method_name)
ActiveSupport::Deprecation.warn("ActiveModel::Errors##{method_name} is deprecated and will be removed in Rails 6.1")
end

@kamipo kamipo merged commit 1cd24e5 into rails:master Apr 25, 2019
Edouard-chin pushed a commit to Edouard-chin/rails that referenced this pull request Jul 8, 2019
….1 instead of 6.0 (rails#36087)

* Change the deprecation for Enumerating ActiveModel::Errors to Rails 6.1 instead of 6.0

* Changed the deprecation message for ActiveModel::Errors methods: slice, values, keys and to_xml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants