From 581f12b7b18a6e5205bfabb814f6e9997bf92be8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20L=C3=BCtke?= Date: Tue, 20 Dec 2005 21:26:27 +0000 Subject: removed :piggyback in favor of just allowing :select on :through associations git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3326 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- .../lib/active_record/associations/has_many_through_association.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'activerecord/lib/active_record/associations') diff --git a/activerecord/lib/active_record/associations/has_many_through_association.rb b/activerecord/lib/active_record/associations/has_many_through_association.rb index ea338e4658..7233876a2d 100644 --- a/activerecord/lib/active_record/associations/has_many_through_association.rb +++ b/activerecord/lib/active_record/associations/has_many_through_association.rb @@ -85,11 +85,7 @@ module ActiveRecord end def construct_select - selected = ["#{@reflection.table_name}.*"] - if @reflection.options[:piggyback] - selected += [@reflection.options[:piggyback]].flatten.collect { |field| "#{@owner.class.reflections[@reflection.options[:through]].table_name}.#{field}" } - end - selected.join(', ') + selected = @reflection.options[:select] || "#{@reflection.table_name}.*" end def construct_scope -- cgit v1.2.3