File tree Expand file tree Collapse file tree 1 file changed +0
-20
lines changed
activerecord/lib/active_record Expand file tree Collapse file tree 1 file changed +0
-20
lines changed Original file line number Diff line number Diff line change @@ -2053,26 +2053,6 @@ def attributes_protected_by_default
2053
2053
default
2054
2054
end
2055
2055
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
-
2076
2056
# Returns a copy of the attributes hash where all the values have been safely quoted for use in
2077
2057
# an Arel insert/update method.
2078
2058
def arel_attributes_values ( include_primary_key = true , include_readonly_attributes = true , attribute_names = @attributes . keys )
You can’t perform that action at this time.
0 commit comments