diff options
Diffstat (limited to 'activerecord/test/models/reply.rb')
-rw-r--r-- | activerecord/test/models/reply.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/activerecord/test/models/reply.rb b/activerecord/test/models/reply.rb index 616c07687c..f5906dedd1 100644 --- a/activerecord/test/models/reply.rb +++ b/activerecord/test/models/reply.rb @@ -4,12 +4,13 @@ class Reply < Topic named_scope :base belongs_to :topic, :foreign_key => "parent_id", :counter_cache => true + belongs_to :topic_with_primary_key, :class_name => "Topic", :primary_key => "title", :foreign_key => "parent_title", :counter_cache => "replies_count" has_many :replies, :class_name => "SillyReply", :dependent => :destroy, :foreign_key => "parent_id" validate :errors_on_empty_content validate_on_create :title_is_wrong_create - attr_accessible :title, :author_name, :author_email_address, :written_on, :content, :last_read + attr_accessible :title, :author_name, :author_email_address, :written_on, :content, :last_read, :parent_title validate :check_empty_title validate_on_create :check_content_mismatch |