noosfero | 2 new commits pushed to repository
Antonio Terceiro
gitlab at gitlab.com
Wed Feb 25 18:34:35 BRT 2015
Antonio Terceiro pushed to refs/heads/master at <a href="https://gitlab.com/noosfero/noosfero">Noosfero / noosfero</a>
Commits:
<a href="https://gitlab.com/noosfero/noosfero/commit/59e2f02e3fd452059b180e636b92cb1f6b0f42ca">59e2f02e</a> by Antonio Terceiro
Properly rename Scrap::Notifier to ScrapNotifier
If we also don't rename the views directory, it won't find them.
See 926442b6d0c469ce6c73d5e32cf9c686e0fca5b4
- - - - -
<a href="https://gitlab.com/noosfero/noosfero/commit/7ce466a92327c45dfa8a61dfe75ebfbb731d0b2a">7ce466a9</a> by Antonio Terceiro
Rename Comment::Notifier to CommentNotifier
- - - - -
Changes:
=====================================
app/mailers/comment_notifier.rb
=====================================
--- a/app/mailers/comment_notifier.rb
+++ b/app/mailers/comment_notifier.rb
@@ -1,4 +1,4 @@
-class Comment::Notifier < ActionMailer::Base
+class CommentNotifier < ActionMailer::Base
def notification(comment)
profile = comment.article.profile
@recipient = profile.nickname || profile.name
=====================================
app/mailers/scrap_notifier.rb
=====================================
--- a/app/mailers/scrap_notifier.rb
+++ b/app/mailers/scrap_notifier.rb
@@ -1,4 +1,4 @@
-class Scrap::Notifier < ActionMailer::Base
+class ScrapNotifier < ActionMailer::Base
def notification(scrap)
sender, receiver = scrap.sender, scrap.receiver
@recipient = receiver.name
=====================================
app/models/comment.rb
=====================================
--- a/app/models/comment.rb
+++ b/app/models/comment.rb
@@ -132,11 +132,11 @@ class Comment < ActiveRecord::Base
def notify_by_mail
if source.kind_of?(Article) && article.notify_comments?
if !notification_emails.empty?
- Comment::Notifier.notification(self).deliver
+ CommentNotifier.notification(self).deliver
end
emails = article.followers - [author_email]
if !emails.empty?
- Comment::Notifier.mail_to_followers(self, emails).deliver
+ CommentNotifier.mail_to_followers(self, emails).deliver
end
end
end
=====================================
app/models/scrap.rb
=====================================
--- a/app/models/scrap.rb
+++ b/app/models/scrap.rb
@@ -25,7 +25,7 @@ class Scrap < ActiveRecord::Base
after_create do |scrap|
scrap.root.update_attribute('updated_at', DateTime.now) unless scrap.root.nil?
- Scrap::Notifier.notification(scrap).deliver if scrap.send_notification?
+ ScrapNotifier.notification(scrap).deliver if scrap.send_notification?
end
before_validation :strip_all_html_tags
=====================================
app/views/comment/notifier/mail_to_followers.html.erb → app/views/comment_notifier/mail_to_followers.html.erb
=====================================
--- a/app/views/comment/notifier/mail_to_followers.html.erb
+++ b/app/views/comment_notifier/mail_to_followers.html.erb
=====================================
app/views/comment/notifier/notification.text.erb → app/views/comment_notifier/notification.text.erb
=====================================
--- a/app/views/comment/notifier/notification.text.erb
+++ b/app/views/comment_notifier/notification.text.erb
=====================================
app/views/scrap/notifier/notification.text.erb → app/views/scrap_notifier/notification.text.erb
=====================================
--- a/app/views/scrap/notifier/notification.text.erb
+++ b/app/views/scrap_notifier/notification.text.erb
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20150225/2d3c8de1/attachment.html>
More information about the Noosfero-dev
mailing list