Commit 31147c8211da54b5f28023e43465737e0b22b116
Exists in
master
and in
27 other branches
Merge remote-tracking branch 'origin/master'
Showing
10 changed files
with
62 additions
and
62 deletions
Show diff stats
app/mailers/comment_notifier.rb
app/mailers/scrap_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/models/scrap.rb
... | ... | @@ -25,7 +25,7 @@ class Scrap < ActiveRecord::Base |
25 | 25 | |
26 | 26 | after_create do |scrap| |
27 | 27 | scrap.root.update_attribute('updated_at', DateTime.now) unless scrap.root.nil? |
28 | - Scrap::Notifier.notification(scrap).deliver if scrap.send_notification? | |
28 | + ScrapNotifier.notification(scrap).deliver if scrap.send_notification? | |
29 | 29 | end |
30 | 30 | |
31 | 31 | before_validation :strip_all_html_tags | ... | ... |
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 %> | ... | ... |
app/views/scrap/notifier/notification.text.erb
... | ... | @@ -1,16 +0,0 @@ |
1 | -<%= _('Hi, %{recipient}!') % { :recipient => @recipient } %> | |
2 | - | |
3 | -<%= word_wrap(_('%{sender} (%{sender_link}) has left the following scrap for you:') % { :sender => @sender, :sender_link => url_for(@sender_link) }) %> | |
4 | - | |
5 | -------------------------------------------------------------------------------- | |
6 | -<%= word_wrap(@scrap_content) %> | |
7 | -------------------------------------------------------------------------------- | |
8 | - | |
9 | -<%= _('View this scrap on the wall') %>: | |
10 | -<%= url_for @wall_url %> | |
11 | - | |
12 | -<%= _("Greetings,") %> | |
13 | - | |
14 | --- | |
15 | -<%= _('%s team.') % @environment %> | |
16 | -<%= url_for @url %> |
... | ... | @@ -0,0 +1,16 @@ |
1 | +<%= _('Hi, %{recipient}!') % { :recipient => @recipient } %> | |
2 | + | |
3 | +<%= word_wrap(_('%{sender} (%{sender_link}) has left the following scrap for you:') % { :sender => @sender, :sender_link => url_for(@sender_link) }) %> | |
4 | + | |
5 | +------------------------------------------------------------------------------- | |
6 | +<%= word_wrap(@scrap_content) %> | |
7 | +------------------------------------------------------------------------------- | |
8 | + | |
9 | +<%= _('View this scrap on the wall') %>: | |
10 | +<%= url_for @wall_url %> | |
11 | + | |
12 | +<%= _("Greetings,") %> | |
13 | + | |
14 | +-- | |
15 | +<%= _('%s team.') % @environment %> | |
16 | +<%= url_for @url %> | ... | ... |