From 8bdcb6f072d503686dc56162c107d72762a67f7d Mon Sep 17 00:00:00 2001 From: Pratik Naik Date: Thu, 21 Jan 2010 00:25:18 +0530 Subject: Always use table.* in the finder query unless specified --- activerecord/lib/active_record/relation/query_methods.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord') diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb index bad6fd716b..0cfe629c07 100644 --- a/activerecord/lib/active_record/relation/query_methods.rb +++ b/activerecord/lib/active_record/relation/query_methods.rb @@ -145,7 +145,7 @@ module ActiveRecord @implicit_readonly = false arel = arel.project(s) if s.present? end - elsif joins.present? + else arel = arel.project(@klass.quoted_table_name + '.*') end -- cgit v1.2.3