mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
c5d62cb86d
Previously, calling `User.model_name.to_json` would result in an infinite recursion as `.model_name` inherited its `.as_json` behavior from Object. This patch fixes that unexpected behavior by delegating `.as_json` to :name. |
||
---|---|---|
.. | ||
serializers | ||
validations | ||
attribute_assignment_test.rb | ||
attribute_methods_test.rb | ||
callbacks_test.rb | ||
conversion_test.rb | ||
dirty_test.rb | ||
errors_test.rb | ||
forbidden_attributes_protection_test.rb | ||
helper.rb | ||
lint_test.rb | ||
model_test.rb | ||
naming_test.rb | ||
railtie_test.rb | ||
secure_password_test.rb | ||
serialization_test.rb | ||
translation_test.rb | ||
validations_test.rb |