Merge pull request #42733 from okuramasafumi/small-improvements-on-active-model

Small improvements on active model
This commit is contained in:
Ryuta Kamizono 2021-07-09 02:03:57 +09:00 committed by GitHub
commit f189e4c4a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -604,7 +604,7 @@ module ActiveModel
end
end
class DeprecationHandlingMessageHash < SimpleDelegator
class DeprecationHandlingMessageHash < SimpleDelegator # :nodoc:
def initialize(errors)
@errors = errors
super(prepare_content)
@ -643,7 +643,7 @@ module ActiveModel
end
end
class DeprecationHandlingMessageArray < SimpleDelegator
class DeprecationHandlingMessageArray < SimpleDelegator # :nodoc:
def initialize(content, errors, attribute)
@errors = errors
@attribute = attribute
@ -665,7 +665,7 @@ module ActiveModel
end
end
class DeprecationHandlingDetailsHash < SimpleDelegator
class DeprecationHandlingDetailsHash < SimpleDelegator # :nodoc:
def initialize(details)
details.default = []
details.freeze

View File

@ -3,6 +3,7 @@
require "active_support/core_ext/hash/except"
require "active_support/core_ext/module/introspection"
require "active_support/core_ext/module/redefine_method"
require "active_support/core_ext/module/delegation"
module ActiveModel
class Name