Commit 7ce466a92327c45dfa8a61dfe75ebfbb731d0b2a
1 parent
59e2f02e
Exists in
master
and in
22 other branches
Rename Comment::Notifier to CommentNotifier
Showing
6 changed files
with
44 additions
and
44 deletions
Show diff stats
app/mailers/comment_notifier.rb
app/models/comment.rb
| ... | ... | @@ -132,11 +132,11 @@ class Comment < ActiveRecord::Base |
| 132 | 132 | def notify_by_mail |
| 133 | 133 | if source.kind_of?(Article) && article.notify_comments? |
| 134 | 134 | if !notification_emails.empty? |
| 135 | - Comment::Notifier.notification(self).deliver | |
| 135 | + CommentNotifier.notification(self).deliver | |
| 136 | 136 | end |
| 137 | 137 | emails = article.followers - [author_email] |
| 138 | 138 | if !emails.empty? |
| 139 | - Comment::Notifier.mail_to_followers(self, emails).deliver | |
| 139 | + CommentNotifier.mail_to_followers(self, emails).deliver | |
| 140 | 140 | end |
| 141 | 141 | end |
| 142 | 142 | end | ... | ... |
app/views/comment/notifier/mail_to_followers.html.erb
| ... | ... | @@ -1,22 +0,0 @@ |
| 1 | -<%= _('Hi!') %> | |
| 2 | - | |
| 3 | -<%= word_wrap(_('%{sender} (%{sender_link}) commented on the content "%{article_title}".') % { :sender => @sender, :sender_link => url_for(@sender_link), :article_title => @article_title }) %> | |
| 4 | - | |
| 5 | -<%= word_wrap(_('Title: %s') % @comment_title) if @comment_title %> | |
| 6 | - | |
| 7 | -<%= _("Comment:") %> | |
| 8 | -------------------------------------------------------------------------------- | |
| 9 | -<%= word_wrap(@comment_body) %> | |
| 10 | -------------------------------------------------------------------------------- | |
| 11 | - | |
| 12 | -<%= _('Click on the address below to view this comment:') %> | |
| 13 | -<%= url_for @comment_url %> | |
| 14 | - | |
| 15 | -<%= _('Click on the address below to cancel the notification of new comments:') %> | |
| 16 | -<%= url_for @unsubscribe_url %> | |
| 17 | - | |
| 18 | -<%= _("Greetings,") %> | |
| 19 | - | |
| 20 | --- | |
| 21 | -<%= _('%s team.') % @environment %> | |
| 22 | -<%= url_for @url %> |
app/views/comment/notifier/notification.text.erb
| ... | ... | @@ -1,19 +0,0 @@ |
| 1 | -<%= _('Hi, %{recipient}!') % { :recipient => @recipient } %> | |
| 2 | - | |
| 3 | -<%= word_wrap(_('%{sender} (%{sender_link}) created a new comment on your article "%{article_title}".') % { :sender => @sender, :sender_link => url_for(@sender_link), :article_title => @article_title }) %> | |
| 4 | - | |
| 5 | -<%= word_wrap(_('Title: %s') % @comment_title) %> | |
| 6 | - | |
| 7 | -<%= _("Comment:") %> | |
| 8 | -------------------------------------------------------------------------------- | |
| 9 | -<%= word_wrap(@comment_body) %> | |
| 10 | -------------------------------------------------------------------------------- | |
| 11 | - | |
| 12 | -<%= _('Access the address below to view this comment:') %> | |
| 13 | -<%= url_for @comment_url %> | |
| 14 | - | |
| 15 | -<%= _("Greetings,") %> | |
| 16 | - | |
| 17 | --- | |
| 18 | -<%= _('%s team.') % @environment %> | |
| 19 | -<%= url_for @url %> |
| ... | ... | @@ -0,0 +1,22 @@ |
| 1 | +<%= _('Hi!') %> | |
| 2 | + | |
| 3 | +<%= word_wrap(_('%{sender} (%{sender_link}) commented on the content "%{article_title}".') % { :sender => @sender, :sender_link => url_for(@sender_link), :article_title => @article_title }) %> | |
| 4 | + | |
| 5 | +<%= word_wrap(_('Title: %s') % @comment_title) if @comment_title %> | |
| 6 | + | |
| 7 | +<%= _("Comment:") %> | |
| 8 | +------------------------------------------------------------------------------- | |
| 9 | +<%= word_wrap(@comment_body) %> | |
| 10 | +------------------------------------------------------------------------------- | |
| 11 | + | |
| 12 | +<%= _('Click on the address below to view this comment:') %> | |
| 13 | +<%= url_for @comment_url %> | |
| 14 | + | |
| 15 | +<%= _('Click on the address below to cancel the notification of new comments:') %> | |
| 16 | +<%= url_for @unsubscribe_url %> | |
| 17 | + | |
| 18 | +<%= _("Greetings,") %> | |
| 19 | + | |
| 20 | +-- | |
| 21 | +<%= _('%s team.') % @environment %> | |
| 22 | +<%= url_for @url %> | ... | ... |
| ... | ... | @@ -0,0 +1,19 @@ |
| 1 | +<%= _('Hi, %{recipient}!') % { :recipient => @recipient } %> | |
| 2 | + | |
| 3 | +<%= word_wrap(_('%{sender} (%{sender_link}) created a new comment on your article "%{article_title}".') % { :sender => @sender, :sender_link => url_for(@sender_link), :article_title => @article_title }) %> | |
| 4 | + | |
| 5 | +<%= word_wrap(_('Title: %s') % @comment_title) %> | |
| 6 | + | |
| 7 | +<%= _("Comment:") %> | |
| 8 | +------------------------------------------------------------------------------- | |
| 9 | +<%= word_wrap(@comment_body) %> | |
| 10 | +------------------------------------------------------------------------------- | |
| 11 | + | |
| 12 | +<%= _('Access the address below to view this comment:') %> | |
| 13 | +<%= url_for @comment_url %> | |
| 14 | + | |
| 15 | +<%= _("Greetings,") %> | |
| 16 | + | |
| 17 | +-- | |
| 18 | +<%= _('%s team.') % @environment %> | |
| 19 | +<%= url_for @url %> | ... | ... |