diff options
author | Jon Leighton <j@jonathanleighton.com> | 2010-09-30 22:01:03 +0100 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2010-09-30 23:29:37 +0100 |
commit | 14c4881f9c7bf4eae61e548542ee309c013e1fca (patch) | |
tree | 0129c6bea6b6b8bd7d19f7ecf4c1cd87fcde900a /activerecord/test/models/author.rb | |
parent | 704961ce688f5bc1942529f44ea6b00014ef8378 (diff) | |
download | rails-14c4881f9c7bf4eae61e548542ee309c013e1fca.tar.gz rails-14c4881f9c7bf4eae61e548542ee309c013e1fca.tar.bz2 rails-14c4881f9c7bf4eae61e548542ee309c013e1fca.zip |
Prevent test_has_many_through_a_has_many_through_association_on_through_reflection failing for me due to ordering of the results
Diffstat (limited to 'activerecord/test/models/author.rb')
-rw-r--r-- | activerecord/test/models/author.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/models/author.rb b/activerecord/test/models/author.rb index 94810e2f34..1efb4fc095 100644 --- a/activerecord/test/models/author.rb +++ b/activerecord/test/models/author.rb @@ -84,14 +84,14 @@ class Author < ActiveRecord::Base has_many :favorite_authors, :through => :author_favorites, :order => 'name' has_many :tagging, :through => :posts # through polymorphic has_one - has_many :taggings, :through => :posts, :source => :taggings # through polymorphic has_many + has_many :taggings, :through => :posts, :source => :taggings # through polymorphic has_many TODO: Why is the :source needed? has_many :tags, :through => :posts # through has_many :through (on source reflection + polymorphic) has_many :distinct_tags, :through => :posts, :source => :tags, :select => "DISTINCT tags.*", :order => "tags.name" has_many :post_categories, :through => :posts, :source => :categories has_many :books has_many :subscriptions, :through => :books - has_many :subscribers, :through => :subscriptions # through has_many :through (on through reflection) + has_many :subscribers, :through => :subscriptions, :order => "subscribers.nick" # through has_many :through (on through reflection) has_many :distinct_subscribers, :through => :subscriptions, :source => :subscriber, :select => "DISTINCT subscribers.*", :order => "subscribers.nick" has_one :essay, :primary_key => :name, :as => :writer |