diff options
author | Adam Cooper <adam.cooper@gmail.com> | 2008-12-31 01:43:13 -0800 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2009-03-06 22:05:18 +0000 |
commit | 3ca5a0f9fd7b7921bca970859da8637011b22dd1 (patch) | |
tree | 43a05f30708106cb98cab1e51dda07c8acd3352b /activerecord/test/models/topic.rb | |
parent | 984bc7a614852944808739fae09a654b6e62872e (diff) | |
download | rails-3ca5a0f9fd7b7921bca970859da8637011b22dd1.tar.gz rails-3ca5a0f9fd7b7921bca970859da8637011b22dd1.tar.bz2 rails-3ca5a0f9fd7b7921bca970859da8637011b22dd1.zip |
Ensure belongs_to association with a counter cache in name spaced model works [#1678 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'activerecord/test/models/topic.rb')
-rw-r--r-- | activerecord/test/models/topic.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/models/topic.rb b/activerecord/test/models/topic.rb index 2fe846db48..f1b7bbae3b 100644 --- a/activerecord/test/models/topic.rb +++ b/activerecord/test/models/topic.rb @@ -71,3 +71,9 @@ class Topic < ActiveRecord::Base end end end + +module Web + class Topic < ActiveRecord::Base + has_many :replies, :dependent => :destroy, :foreign_key => "parent_id", :class_name => 'Web::Reply' + end +end
\ No newline at end of file |