Module: WhatsonComment::Moderation
- Defined in:
- app/models/whatson_comment.rb
Class Method Summary collapse
Class Method Details
.enabled? ⇒ Boolean
70 71 72 73 74 75 |
# File 'app/models/whatson_comment.rb', line 70 def enabled? RefinerySetting.find_or_set(:comment_moderation, true, { :scoping => 'whatson', :restricted => false }) end |
.toggle! ⇒ Object
77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'app/models/whatson_comment.rb', line 77 def toggle! new_value = { :value => !WhatsonComment::Moderation.enabled?, :scoping => 'whatson', :restricted => false } if RefinerySetting.respond_to?(:set) RefinerySetting.set(:comment_moderation, new_value) else RefinerySetting[:comment_moderation] = new_value end end |