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

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

Class Method Summary collapse

Class Method Details

.recipientsObject



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

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



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

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

.subjectObject



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

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

.subject=(subject_line) ⇒ Object



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

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