Commit fddbe1966ab99dc864168c00447efef1698fa51f
1 parent
bcfeaf56
Exists in
master
and in
3 other branches
No longer keep a record of the follow if the followable object is deleted.
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
lib/acts_as_follower.rb
@@ -13,7 +13,7 @@ module ActiveRecord #:nodoc: | @@ -13,7 +13,7 @@ module ActiveRecord #:nodoc: | ||
13 | 13 | ||
14 | module ClassMethods | 14 | module ClassMethods |
15 | def acts_as_follower | 15 | def acts_as_follower |
16 | - has_many :follows, :as => :follower, :dependent => :nullify # If a following entity is deleted, keep the follows. | 16 | + has_many :follows, :as => :follower, :dependent => :destroy |
17 | include ActiveRecord::Acts::Follower::InstanceMethods | 17 | include ActiveRecord::Acts::Follower::InstanceMethods |
18 | end | 18 | end |
19 | end | 19 | end |