From 0abba2813be52cc8f8ff2544f8a3b18b5083be53 Mon Sep 17 00:00:00 2001 From: Emilio Tagua Date: Tue, 18 Aug 2009 19:38:03 -0300 Subject: Call to_sql method on ActiveRecord::Relation instance not it's relation attribute.' --- activerecord/lib/active_record/base.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index c74d8c6190..4636a8b338 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -1733,7 +1733,7 @@ module ActiveRecord #:nodoc: end def construct_finder_sql(options, scope = scope(:find)) - construct_finder_arel(options, scope).relation.to_sql + construct_finder_arel(options, scope).to_sql end def construct_join(joins, scope) -- cgit v1.2.3