Skip to content

Commit d06a754

Browse files
committed
Remove unused attributes_with_quotes method.
1 parent fc2e257 commit d06a754

File tree

1 file changed

+0
-20
lines changed
  • activerecord/lib/active_record

1 file changed

+0
-20
lines changed

activerecord/lib/active_record/base.rb

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2053,26 +2053,6 @@ def attributes_protected_by_default
20532053
default
20542054
end
20552055

2056-
# Returns a copy of the attributes hash where all the values have been safely quoted for use in
2057-
# an SQL statement.
2058-
def attributes_with_quotes(include_primary_key = true, include_readonly_attributes = true, attribute_names = @attributes.keys)
2059-
quoted = {}
2060-
connection = self.class.connection
2061-
attribute_names.each do |name|
2062-
if (column = column_for_attribute(name)) && (include_primary_key || !column.primary)
2063-
value = read_attribute(name)
2064-
2065-
# We need explicit to_yaml because quote() does not properly convert Time/Date fields to YAML.
2066-
if value && self.class.serialized_attributes.has_key?(name) && (value.acts_like?(:date) || value.acts_like?(:time))
2067-
value = value.to_yaml
2068-
end
2069-
2070-
quoted[name] = connection.quote(value, column)
2071-
end
2072-
end
2073-
include_readonly_attributes ? quoted : remove_readonly_attributes(quoted)
2074-
end
2075-
20762056
# Returns a copy of the attributes hash where all the values have been safely quoted for use in
20772057
# an Arel insert/update method.
20782058
def arel_attributes_values(include_primary_key = true, include_readonly_attributes = true, attribute_names = @attributes.keys)

0 commit comments

Comments
 (0)