From 2d0bc08a7e1a0ecee577674deba2c0a17fe665e4 Mon Sep 17 00:00:00 2001 From: Pratik Naik Date: Sat, 16 Jan 2010 04:17:23 +0530 Subject: Make type_condition return Arel predicate and not a string condition --- .../lib/active_record/associations/through_association_scope.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib/active_record/associations') diff --git a/activerecord/lib/active_record/associations/through_association_scope.rb b/activerecord/lib/active_record/associations/through_association_scope.rb index 1001199daa..6f0f698f1e 100644 --- a/activerecord/lib/active_record/associations/through_association_scope.rb +++ b/activerecord/lib/active_record/associations/through_association_scope.rb @@ -144,7 +144,7 @@ module ActiveRecord end def build_sti_condition - @reflection.through_reflection.klass.send(:type_condition) + @reflection.through_reflection.klass.send(:type_condition).to_sql end alias_method :sql_conditions, :conditions -- cgit v1.2.3