Skip to content

Commit

Permalink
Migrate ActiveRecord::Normalization to Active Model (#1290)
Browse files Browse the repository at this point in the history
  • Loading branch information
aidanharan authored Jan 9, 2025
1 parent c7f4cf5 commit c8ea8ce
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ def sp_executesql_types_and_parameters(binds)

def sp_executesql_sql_type(attr)
if attr.respond_to?(:type)
type = attr.type.is_a?(ActiveRecord::Normalization::NormalizedValueType) ? attr.type.cast_type : attr.type
type = attr.type.is_a?(ActiveModel::Attributes::Normalization::NormalizedValueType) ? attr.type.cast_type : attr.type
type = type.subtype if type.serialized?

return type.sqlserver_type if type.respond_to?(:sqlserver_type)
Expand Down

0 comments on commit c8ea8ce

Please sign in to comment.