diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2019-07-23 08:31:46 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-23 08:31:46 -0400 |
commit | 990c07794e68b3df5ba0e987db76d77f7f674da1 (patch) | |
tree | adb2995b52da5ed7af89787c6dcb501e180455d4 /activemodel/lib | |
parent | d33428611c8c3a3decf999ae17e0f33513c26861 (diff) | |
parent | 35ac22d6ef60bcfb699ed6e92d9cbe4d891762c3 (diff) | |
download | rails-990c07794e68b3df5ba0e987db76d77f7f674da1.tar.gz rails-990c07794e68b3df5ba0e987db76d77f7f674da1.tar.bz2 rails-990c07794e68b3df5ba0e987db76d77f7f674da1.zip |
Merge pull request #36724 from Edouard-chin/ec-to-h-errors
Deprecate `AM::Errors#to_h`:
Diffstat (limited to 'activemodel/lib')
-rw-r--r-- | activemodel/lib/active_model/errors.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activemodel/lib/active_model/errors.rb b/activemodel/lib/active_model/errors.rb index 5628a59845..e7405fb586 100644 --- a/activemodel/lib/active_model/errors.rb +++ b/activemodel/lib/active_model/errors.rb @@ -303,6 +303,12 @@ module ActiveModel hash end + def to_h + deprecation_rename_warning(:to_h, :to_hash) + + to_hash + end + def messages DeprecationHandlingMessageHash.new(self) end |