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.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/test/models/author.rb b/activerecord/test/models/author.rb
index 0d9ee36b20..b844c7cce0 100644
--- a/activerecord/test/models/author.rb
+++ b/activerecord/test/models/author.rb
@@ -87,6 +87,8 @@ class Author < ActiveRecord::Base
has_many :tags, :through => :posts # through has_many :through
has_many :post_categories, :through => :posts, :source => :categories
+ has_one :essay, :primary_key => :name, :as => :writer
+
belongs_to :author_address, :dependent => :destroy
belongs_to :author_address_extra, :dependent => :delete, :class_name => "AuthorAddress"