diff options
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb b/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb index d06af335ef..aebe521ca0 100644 --- a/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb +++ b/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb @@ -53,7 +53,6 @@ module ActiveRecord options[:conditions] = conditions options[:joins] = @join_sql options[:readonly] = finding_with_ambigious_select?(options[:select]) - options[:select] ||= '*' if options[:order] && @reflection.options[:order] options[:order] = "#{options[:order]}, #{@reflection.options[:order]}" @@ -63,6 +62,8 @@ module ActiveRecord merge_options_from_reflection!(options) + options[:select] ||= '*' + # Pass through args exactly as we received them. args << options @reflection.klass.find(*args) |