diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2016-08-16 22:54:43 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-16 22:54:43 -0300 |
commit | 12a42f79adb972948c7509a0be2971ca2c37e7c3 (patch) | |
tree | ac162e25981845606bc2f1ccf1f5cfad4577ed44 /activerecord/lib/active_record | |
parent | a1e4c197cb12fef66530a2edfaeda75566088d1f (diff) | |
parent | d14a5defeb0c9f2972f90d83cb625beed8105d76 (diff) | |
download | rails-12a42f79adb972948c7509a0be2971ca2c37e7c3.tar.gz rails-12a42f79adb972948c7509a0be2971ca2c37e7c3.tar.bz2 rails-12a42f79adb972948c7509a0be2971ca2c37e7c3.zip |
Merge pull request #26000 from kamipo/remove_sanitize
Remove internal `sanitize` method
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/sanitization.rb | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/activerecord/lib/active_record/sanitization.rb b/activerecord/lib/active_record/sanitization.rb index 6617008344..c40e98715e 100644 --- a/activerecord/lib/active_record/sanitization.rb +++ b/activerecord/lib/active_record/sanitization.rb @@ -5,13 +5,6 @@ module ActiveRecord extend ActiveSupport::Concern module ClassMethods - # Used to sanitize objects before they're used in an SQL SELECT statement. - # Delegates to {connection.quote}[rdoc-ref:ConnectionAdapters::Quoting#quote]. - def sanitize(object) # :nodoc: - connection.quote(object) - end - alias_method :quote_value, :sanitize - protected # Accepts an array or string of SQL conditions and sanitizes @@ -216,7 +209,7 @@ module ActiveRecord # TODO: Deprecate this def quoted_id # :nodoc: - self.class.quote_value(@attributes[self.class.primary_key].value_for_database) + self.class.connection.quote(@attributes[self.class.primary_key].value_for_database) end end end |