mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
BindParam
should not be passed to type_cast_for_database
This commit is contained in:
parent
a7c187343e
commit
e9b2dde297
4 changed files with 4 additions and 6 deletions
|
@ -9,7 +9,6 @@ module ActiveRecord
|
|||
end
|
||||
|
||||
def type_cast_for_database(attr_name, value)
|
||||
return value if value.is_a?(Arel::Nodes::BindParam)
|
||||
type = type_for_attribute(attr_name)
|
||||
type.serialize(value)
|
||||
end
|
||||
|
|
|
@ -8,7 +8,6 @@ module ActiveRecord
|
|||
end
|
||||
|
||||
def type_cast_for_database(attr_name, value)
|
||||
return value if value.is_a?(Arel::Nodes::BindParam)
|
||||
type = type_for_attribute(attr_name)
|
||||
type.serialize(value)
|
||||
end
|
||||
|
|
|
@ -15,8 +15,8 @@ module Arel # :nodoc: all
|
|||
relation.respond_to?(:name) ? relation.name : name
|
||||
end
|
||||
|
||||
def type_cast_for_database(*args)
|
||||
relation.type_cast_for_database(*args)
|
||||
def type_cast_for_database(attr_name, value)
|
||||
relation.type_cast_for_database(attr_name, value)
|
||||
end
|
||||
|
||||
def type_for_attribute(name)
|
||||
|
|
|
@ -97,8 +97,8 @@ module Arel # :nodoc: all
|
|||
end
|
||||
alias :== :eql?
|
||||
|
||||
def type_cast_for_database(attribute_name, value)
|
||||
type_caster.type_cast_for_database(attribute_name, value)
|
||||
def type_cast_for_database(attr_name, value)
|
||||
type_caster.type_cast_for_database(attr_name, value)
|
||||
end
|
||||
|
||||
def type_for_attribute(name)
|
||||
|
|
Loading…
Reference in a new issue