aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorTobias Lütke <tobias.luetke@gmail.com>2005-12-20 21:26:27 +0000
committerTobias Lütke <tobias.luetke@gmail.com>2005-12-20 21:26:27 +0000
commit581f12b7b18a6e5205bfabb814f6e9997bf92be8 (patch)
treeb5d0c83acdce528ba2882e1ece6012099b3d253d /activerecord/lib/active_record
parent90099e9dc287d46178581d6b09d8b42a0a302a04 (diff)
downloadrails-581f12b7b18a6e5205bfabb814f6e9997bf92be8.tar.gz
rails-581f12b7b18a6e5205bfabb814f6e9997bf92be8.tar.bz2
rails-581f12b7b18a6e5205bfabb814f6e9997bf92be8.zip
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
Diffstat (limited to 'activerecord/lib/active_record')
-rwxr-xr-xactiverecord/lib/active_record/associations.rb2
-rw-r--r--activerecord/lib/active_record/associations/has_many_through_association.rb6
2 files changed, 2 insertions, 6 deletions
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb
index 8ee6eca15f..562a2dc6b7 100755
--- a/activerecord/lib/active_record/associations.rb
+++ b/activerecord/lib/active_record/associations.rb
@@ -881,7 +881,7 @@ module ActiveRecord
:class_name, :table_name, :foreign_key,
:exclusively_dependent, :dependent,
:select, :conditions, :include, :order, :group, :limit, :offset,
- :as, :through, :piggyback,
+ :as, :through,
:finder_sql, :counter_sql,
:before_add, :after_add, :before_remove, :after_remove,
:extend
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