aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/reply.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2009-07-21 12:51:53 +0200
committerJosé Valim <jose.valim@gmail.com>2009-07-21 12:51:53 +0200
commit33048b6e2738ff73b612dbcb35955189221dfbd0 (patch)
tree7e32f6031199c1e7ee9a3e5a15789b5f568a565d /activerecord/test/models/reply.rb
parentedda0bfe76fc9b2adcdb705665aaef2769e6ef03 (diff)
parent9d7aae710384fb5f04129c35b86c5ea5fb9d83a9 (diff)
downloadrails-33048b6e2738ff73b612dbcb35955189221dfbd0.tar.gz
rails-33048b6e2738ff73b612dbcb35955189221dfbd0.tar.bz2
rails-33048b6e2738ff73b612dbcb35955189221dfbd0.zip
Solving merge conflicts.
Diffstat (limited to 'activerecord/test/models/reply.rb')
-rw-r--r--activerecord/test/models/reply.rb3
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