mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #40916 from alpaca-tc/reuse_activemodel_type_value
Reuse the same ActiveModel::Type::Value
This commit is contained in:
commit
007a86506f
1 changed files with 1 additions and 1 deletions
|
@ -16,7 +16,7 @@ module ActiveModel
|
|||
end
|
||||
|
||||
module ClassMethods
|
||||
def attribute(name, type = Type::Value.new, **options)
|
||||
def attribute(name, type = Type.default_value, **options)
|
||||
name = name.to_s
|
||||
if type.is_a?(Symbol)
|
||||
type = ActiveModel::Type.lookup(type, **options.except(:default))
|
||||
|
|
Loading…
Reference in a new issue