From b80d304f11f14643fb0f7b503d973c62a94fb20d Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Fri, 1 Jan 2016 06:18:03 +0900 Subject: Refactor `case_{sensitive|insensitive}_comparison` Before: ``` SELECT 1 AS one FROM "topics" WHERE "topics"."title" = 'abc' LIMIT $1 [["LIMIT", 1]] ``` After: ``` SELECT 1 AS one FROM "topics" WHERE "topics"."title" = $1 LIMIT $2 [["title", "abc"], ["LIMIT", 1]] ``` --- activerecord/lib/active_record/relation/where_clause_factory.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'activerecord/lib/active_record/relation') diff --git a/activerecord/lib/active_record/relation/where_clause_factory.rb b/activerecord/lib/active_record/relation/where_clause_factory.rb index a81ff98e49..dbf172a577 100644 --- a/activerecord/lib/active_record/relation/where_clause_factory.rb +++ b/activerecord/lib/active_record/relation/where_clause_factory.rb @@ -22,6 +22,7 @@ module ActiveRecord parts = predicate_builder.build_from_hash(attributes) when Arel::Nodes::Node parts = [opts] + binds = other else raise ArgumentError, "Unsupported argument type: #{opts} (#{opts.class})" end -- cgit v1.2.3