Refactor SpamRulesEnforcer so that each spam rule is in its own class

This commit is contained in:
Neil Lalonde
2013-10-25 13:25:02 -04:00
parent 90938df967
commit 4e46d91b8d
7 changed files with 462 additions and 366 deletions

View File

@@ -252,7 +252,7 @@ class Guardian
end
def can_create_post?(parent)
!SpamRulesEnforcer.block?(@user) && (
!SpamRule::AutoBlock.block?(@user) && (
!parent ||
!parent.category ||
Category.post_create_allowed(self).where(:id => parent.category.id).count == 1