aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/topic.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/models/topic.rb')
-rw-r--r--activerecord/test/models/topic.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/test/models/topic.rb b/activerecord/test/models/topic.rb
index 51012d22ed..201d96dcd7 100644
--- a/activerecord/test/models/topic.rb
+++ b/activerecord/test/models/topic.rb
@@ -39,6 +39,7 @@ class Topic < ActiveRecord::Base
named_scope :by_rejected_ids, lambda {{ :conditions => { :id => all(:conditions => {:approved => false}).map(&:id) } }}
has_many :replies, :dependent => :destroy, :foreign_key => "parent_id"
+ has_many :replies_with_primary_key, :class_name => "Reply", :dependent => :destroy, :primary_key => "title", :foreign_key => "parent_title"
serialize :content
before_create :default_written_on