spacing
This commit is contained in:
parent
6f85dad2f8
commit
aec6ed5a1f
1 changed files with 14 additions and 4 deletions
|
@ -11,11 +11,16 @@ class BlogComment < ActiveRecord::Base
|
|||
module Moderation
|
||||
class << self
|
||||
def enabled?
|
||||
RefinerySetting.find_or_set(:comment_moderation, true, {:scoping => :blog})
|
||||
RefinerySetting.find_or_set(:comment_moderation, true, {
|
||||
:scoping => :blog
|
||||
})
|
||||
end
|
||||
|
||||
def toggle
|
||||
RefinerySetting[:comment_moderation] = {:value => !self.enabled?, :scoping => :blog}
|
||||
RefinerySetting[:comment_moderation] = {
|
||||
:value => !self.enabled?,
|
||||
:scoping => :blog
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -24,12 +29,17 @@ class BlogComment < ActiveRecord::Base
|
|||
class << self
|
||||
def recipients
|
||||
RefinerySetting.find_or_set(
|
||||
:comment_notification_recipients, (Role[:refinery].users.first.email rescue ''), {:scoping => :blog}
|
||||
:comment_notification_recipients,
|
||||
(Role[:refinery].users.first.email rescue ''),
|
||||
{:scoping => :blog}
|
||||
)
|
||||
end
|
||||
|
||||
def recipients=(emails)
|
||||
RefinerySetting[:comment_notification_recipients] = {:value => emails, :scoping => :blog}
|
||||
RefinerySetting[:comment_notification_recipients] = {
|
||||
:value => emails,
|
||||
:scoping => :blog
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue