aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2013-04-04 13:35:12 -0700
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2013-04-04 13:35:12 -0700
commitba4c27479add60b783a0e623c8a5d176c1dc9043 (patch)
tree722e4388e6199c22053fa16f0715b9f2a7fd6657 /activerecord/test/models
parent25fcc1739f966caa8c0c5b93c977f985c11b9de7 (diff)
parent812469943cc6eddc132d137a0d5929b2c5d0346f (diff)
downloadrails-ba4c27479add60b783a0e623c8a5d176c1dc9043.tar.gz
rails-ba4c27479add60b783a0e623c8a5d176c1dc9043.tar.bz2
rails-ba4c27479add60b783a0e623c8a5d176c1dc9043.zip
Merge pull request #10087 from neerajdotname/10016
has_many through obeys order on through association
Diffstat (limited to 'activerecord/test/models')
-rw-r--r--activerecord/test/models/owner.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/models/owner.rb b/activerecord/test/models/owner.rb
index fea55f4535..1c7ed4aa3e 100644
--- a/activerecord/test/models/owner.rb
+++ b/activerecord/test/models/owner.rb
@@ -1,5 +1,5 @@
class Owner < ActiveRecord::Base
self.primary_key = :owner_id
- has_many :pets
+ has_many :pets, -> { order 'pets.name desc' }
has_many :toys, :through => :pets
end