Module: Refinery::Blog::Comment::Notification

Defined in:
app/models/refinery/blog/comment.rb

Class Method Summary collapse

Class Method Details

.recipientsObject



98
99
100
101
102
103
104
# File 'app/models/refinery/blog/comment.rb', line 98

def recipients
  Refinery::Setting.find_or_set(:comment_notification_recipients, (Refinery::Role[:refinery].users.first.email rescue ''),
  {
    :scoping => 'blog',
    :restricted => false
  })
end

.recipients=(emails) ⇒ Object



106
107
108
109
110
111
112
113
# File 'app/models/refinery/blog/comment.rb', line 106

def recipients=(emails)
  new_value = {
    :value => emails,
    :scoping => 'blog',
    :restricted => false
  }
  Refinery::Setting.set(:comment_notification_recipients, new_value)
end

.subjectObject



115
116
117
118
119
120
# File 'app/models/refinery/blog/comment.rb', line 115

def subject
  Refinery::Setting.find_or_set(:comment_notification_subject, "New inquiry from your website", {
    :scoping => 'blog',
    :restricted => false
  })
end

.subject=(subject_line) ⇒ Object



122
123
124
125
126
127
128
129
# File 'app/models/refinery/blog/comment.rb', line 122

def subject=(subject_line)
  new_value = {
    :value => subject_line,
    :scoping => 'blog',
    :restricted => false
  }
  Refinery::Setting.set(:comment_notification_subject, new_value)
end