aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/author.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/models/author.rb')
-rw-r--r--activerecord/test/models/author.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/test/models/author.rb b/activerecord/test/models/author.rb
index b52b643ad7..da7e4139b1 100644
--- a/activerecord/test/models/author.rb
+++ b/activerecord/test/models/author.rb
@@ -116,6 +116,7 @@ class Author < ActiveRecord::Base
has_many :tags_with_primary_key, through: :posts
has_many :books
+ has_many :published_books, class_name: "PublishedBook"
has_many :unpublished_books, -> { where(status: [:proposed, :written]) }, class_name: "Book"
has_many :subscriptions, through: :books
has_many :subscribers, -> { order("subscribers.nick") }, through: :subscriptions