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

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

Class Method Summary collapse

Class Method Details

.recipientsObject



89
90
91
92
93
94
95
# File 'app/models/refinery/blog/comment.rb', line 89

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



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

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

.subjectObject



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

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

.subject=(subject_line) ⇒ Object



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

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