Skip to content

Do not override Object#to_json with mimic_json if ActiveSupport is existed#936

Merged
ohler55 merged 7 commits intoohler55:developfrom
Watson1978:rails7.2
Aug 18, 2024
Merged

Do not override Object#to_json with mimic_json if ActiveSupport is existed#936
ohler55 merged 7 commits intoohler55:developfrom
Watson1978:rails7.2

Conversation

@Watson1978
Copy link
Copy Markdown
Collaborator

Fix #934

@Watson1978 Watson1978 marked this pull request as draft August 18, 2024 13:58
@Watson1978 Watson1978 marked this pull request as ready for review August 18, 2024 14:40
@Watson1978 Watson1978 changed the title Do not override Object#to_json with mimic_json Do not override Object#to_json with mimic_json if ActiveSupport is existed Aug 18, 2024
@ohler55 ohler55 merged commit 2570138 into ohler55:develop Aug 18, 2024
@Watson1978 Watson1978 deleted the rails7.2 branch August 18, 2024 14:54
# Show backtraces for deprecated behavior for quicker cleanup.
ActiveSupport::Deprecation.debug = true
if ActiveSupport::Deprecation.respond_to?(:debug)
# Rails 7.2 does not have ActiveSupport::Deprecation.debug
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@ohler55 & @Watson1978 , for Rails 7.2 I think you want to call:

ActiveSupport.deprecator.debug = true

Each module in Rails has its own deprecator instance now: rails/rails@e5af9c2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

#as_json ignored on Rails 7.2.0

3 participants