diff options
Diffstat (limited to 'activerecord/lib/active_record/relation/predicate_builder/basic_object_handler.rb')
-rw-r--r-- | activerecord/lib/active_record/relation/predicate_builder/basic_object_handler.rb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation/predicate_builder/basic_object_handler.rb b/activerecord/lib/active_record/relation/predicate_builder/basic_object_handler.rb index a17cf30ffd..34db266f05 100644 --- a/activerecord/lib/active_record/relation/predicate_builder/basic_object_handler.rb +++ b/activerecord/lib/active_record/relation/predicate_builder/basic_object_handler.rb @@ -3,9 +3,18 @@ module ActiveRecord class PredicateBuilder class BasicObjectHandler # :nodoc: + def initialize(predicate_builder) + @predicate_builder = predicate_builder + end + def call(attribute, value) - attribute.eq(value) + bind = predicate_builder.build_bind_attribute(attribute.name, value) + attribute.eq(bind) end + + protected + + attr_reader :predicate_builder end end end |