Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Specify :dependent => :nullify on Category so that when a category is…

… deleted the forums beneath it have category_id set to nil. Closes #25.
  • Loading branch information...
commit 206c81b48f70a97b5c6da0e5732926c2c4a96494 1 parent c6de2d1
Ryan Bigg authored
View
2  app/models/category.rb
@@ -3,7 +3,7 @@ class Category < ActiveRecord::Base
acts_as_tree
acts_as_list
- has_many :forums
+ has_many :forums, :dependent => :nullify
has_many :permissions
has_many :groups, :through => :permissions
View
1  spec/support/blueprints/post.rb
@@ -1,3 +1,4 @@
Post.blueprint do
text { "This is some default text" }
+ ip { Ip.make(:localhost) }
end
View
1  spec/support/blueprints/topics.rb
@@ -1,4 +1,5 @@
Topic.blueprint do
subject "Default topic"
user { User.ensure(:administrator) }
+ ip { Ip.make(:localhost) }
end
Please sign in to comment.
Something went wrong with that request. Please try again.