diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2017-07-28 17:18:09 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2017-07-28 17:18:09 +0900 |
commit | d148c32983bbf1a2b60deed25e3b4eb4fb28d084 (patch) | |
tree | caefec39bee75cc2d6a75546f6d12718315fa798 /activerecord/lib/active_record/connection_adapters/abstract_adapter.rb | |
parent | 17169cfb7167e357d50290eace083ce3b38bfb7f (diff) | |
download | rails-d148c32983bbf1a2b60deed25e3b4eb4fb28d084.tar.gz rails-d148c32983bbf1a2b60deed25e3b4eb4fb28d084.tar.bz2 rails-d148c32983bbf1a2b60deed25e3b4eb4fb28d084.zip |
Use `predicate_builder.build_bind_attribute` wherever possible
For less duplicated code.
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract_adapter.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb index e699a77230..7645cf7825 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb @@ -421,14 +421,14 @@ module ActiveRecord end def case_sensitive_comparison(table, attribute, column, value) # :nodoc: - table[attribute].eq(Arel::Nodes::BindParam.new(value)) + table[attribute].eq(value) end def case_insensitive_comparison(table, attribute, column, value) # :nodoc: if can_perform_case_insensitive_comparison_for?(column) - table[attribute].lower.eq(table.lower(Arel::Nodes::BindParam.new(value))) + table[attribute].lower.eq(table.lower(value)) else - table[attribute].eq(Arel::Nodes::BindParam.new(value)) + table[attribute].eq(value) end end |