mod/05_email/set/all/follow.rb in card-1.17.3 vs mod/05_email/set/all/follow.rb in card-1.17.4

- old
+ new

@@ -18,11 +18,11 @@ event :cache_expired_for_name_change, before: :store, on: :update, changed: :name do Card.follow_caches_expired end -event :cache_expired_for_new_user_rule, +event :cache_expired_for_new_preference, before: :extend, when: proc { |c| c.follow_rule_card? } do Card.follow_caches_expired end @@ -93,11 +93,11 @@ def follower_names followers.map(&:name) end def follow_rule_card? - is_user_rule? && rule_setting_name == '*follow' + is_preference? && rule_setting_name == '*follow' end def follow_option? codename && FollowOption.codenames.include?(codename.to_sym) end @@ -234,10 +234,10 @@ end module ClassMethods def follow_caches_expired Card.clear_follower_ids_cache - Card.clear_user_rule_cache + Card.clear_preference_cache end def follower_ids_cache Card.cache.read(FOLLOWER_IDS_CACHE_KEY) || {} end