diff options
author | kennyj <kennyj@gmail.com> | 2012-07-10 01:31:27 +0900 |
---|---|---|
committer | kennyj <kennyj@gmail.com> | 2012-07-14 03:06:18 +0900 |
commit | 539b69e05deaa6792e91f4f9dca6a2735f290a8f (patch) | |
tree | 6317b7fe736efa3ef05a42b356a8bc5afd0a34a4 /activerecord | |
parent | fd9655c9dc9c96dc43cc6b22e64ec216db2fdfc0 (diff) | |
download | rails-539b69e05deaa6792e91f4f9dca6a2735f290a8f.tar.gz rails-539b69e05deaa6792e91f4f9dca6a2735f290a8f.tar.bz2 rails-539b69e05deaa6792e91f4f9dca6a2735f290a8f.zip |
Remove instance level quote_value method. This method is private and also exists in class method.
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/locking/optimistic.rb | 2 | ||||
-rw-r--r-- | activerecord/lib/active_record/sanitization.rb | 11 |
2 files changed, 3 insertions, 10 deletions
diff --git a/activerecord/lib/active_record/locking/optimistic.rb b/activerecord/lib/active_record/locking/optimistic.rb index 4ce42feb74..e0344f3c56 100644 --- a/activerecord/lib/active_record/locking/optimistic.rb +++ b/activerecord/lib/active_record/locking/optimistic.rb @@ -86,7 +86,7 @@ module ActiveRecord 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)) diff --git a/activerecord/lib/active_record/sanitization.rb b/activerecord/lib/active_record/sanitization.rb index 46f6c283e3..ca767cc704 100644 --- a/activerecord/lib/active_record/sanitization.rb +++ b/activerecord/lib/active_record/sanitization.rb @@ -148,15 +148,8 @@ module ActiveRecord 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 |