Permalink
Browse files

Remove instance level quote_value method. This method is private and …

…also exists in class method.
  • Loading branch information...
1 parent fd9655c commit 539b69e05deaa6792e91f4f9dca6a2735f290a8f @kennyj committed Jul 9, 2012
@@ -86,7 +86,7 @@ def update(attribute_names = @attributes.keys) #:nodoc:
stmt = relation.where(
relation.table[self.class.primary_key].eq(id).and(
- relation.table[lock_col].eq(quote_value(previous_lock_value))
+ relation.table[lock_col].eq(self.class.quote_value(previous_lock_value))
)
).arel.compile_update(arel_attributes_with_values_for_update(attribute_names))
@@ -148,15 +148,8 @@ def raise_if_bind_arity_mismatch(statement, expected, provided) #:nodoc:
end
# TODO: Deprecate this
- def quoted_id #:nodoc:
- quote_value(id, column_for_attribute(self.class.primary_key))
- end
-
- private
-
- # Quote strings appropriately for SQL statements.
- def quote_value(value, column = nil)
- self.class.connection.quote(value, column)
+ def quoted_id
+ self.class.quote_value(id, column_for_attribute(self.class.primary_key))
end
end
end

0 comments on commit 539b69e

Please sign in to comment.