Skip to content
Browse files

Updating cascade

  • Loading branch information...
1 parent 19eacf7 commit 53ac83a9c6548b2ec09c715801676c06db0f935a Russell committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/acts_as_moderatable.rb
View
2 lib/acts_as_moderatable.rb
@@ -84,7 +84,7 @@ def cascade_block blocked = nil
Rails.logger.debug "*******#{item.class.name} is missing :is_blocked field" and break unless item.respond_to? :is_blocked
item.toggle_blocked
Rails.logger.debug "##############FIXING BLOCKED VALUE for #{item.class.name} -- #{item.id}###############" unless blocked.nil? or item.is_blocked == blocked
- item.is_blocked = blocked unless blocked.nil? or item.is_blocked == blocked
+ item.is_blocked = blocked and item.save unless blocked.nil? or item.is_blocked == blocked
APP_CONFIG[:mismatches].push "#{item.class.name} -- #{item.id}" unless blocked.nil? or item.is_blocked == blocked
count += 1
Rails.logger.debug "*******BLOCKED VALUE MISMATCH: GOT #{item.is_blocked.to_s} EXPECTED #{blocked.to_s}" unless blocked.nil? or blocked == item.is_blocked

0 comments on commit 53ac83a

Please sign in to comment.
Something went wrong with that request. Please try again.