aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models
diff options
context:
space:
mode:
authorAndrew White <andyw@pixeltrix.co.uk>2010-03-31 02:33:04 +0100
committerwycats <wycats@gmail.com>2010-04-12 21:31:20 -0700
commit9cea9bc7f0c104095dddc036bea7f6ecb9590075 (patch)
tree612e9c686756164fa5fedb71985f6105624137f4 /activerecord/test/models
parentee04aea3ec1461368a72db525b325846e29b0045 (diff)
downloadrails-9cea9bc7f0c104095dddc036bea7f6ecb9590075.tar.gz
rails-9cea9bc7f0c104095dddc036bea7f6ecb9590075.tar.bz2
rails-9cea9bc7f0c104095dddc036bea7f6ecb9590075.zip
Refactor compute_type to handle situations where the correct class is already loaded
Signed-off-by: wycats <wycats@gmail.com>
Diffstat (limited to 'activerecord/test/models')
-rw-r--r--activerecord/test/models/shop.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/activerecord/test/models/shop.rb b/activerecord/test/models/shop.rb
new file mode 100644
index 0000000000..b232185693
--- /dev/null
+++ b/activerecord/test/models/shop.rb
@@ -0,0 +1,12 @@
+module Shop
+ class Collection < ActiveRecord::Base
+ has_many :products, :dependent => :nullify
+ end
+
+ class Product < ActiveRecord::Base
+ has_many :variants, :dependent => :delete_all
+ end
+
+ class Variant < ActiveRecord::Base
+ end
+end