Commit cc51297159d88b13ac73cb6df64b412c6ac1f9b3

Authored by Weblate
2 parents 283c7d81 661d4188

Merge remote-tracking branch 'origin/master'

app/mailers/scrap_notifier.rb
1 -class ScrapNotifier < ActionMailer::Base 1 +class Scrap::Notifier < ActionMailer::Base
2 def notification(scrap) 2 def notification(scrap)
3 sender, receiver = scrap.sender, scrap.receiver 3 sender, receiver = scrap.sender, scrap.receiver
4 @recipient = receiver.name 4 @recipient = receiver.name
app/models/scrap.rb
@@ -25,7 +25,7 @@ class Scrap &lt; ActiveRecord::Base @@ -25,7 +25,7 @@ class Scrap &lt; ActiveRecord::Base
25 25
26 after_create do |scrap| 26 after_create do |scrap|
27 scrap.root.update_attribute('updated_at', DateTime.now) unless scrap.root.nil? 27 scrap.root.update_attribute('updated_at', DateTime.now) unless scrap.root.nil?
28 - ScrapNotifier.notification(scrap).deliver if scrap.send_notification? 28 + Scrap::Notifier.notification(scrap).deliver if scrap.send_notification?
29 end 29 end
30 30
31 before_validation :strip_all_html_tags 31 before_validation :strip_all_html_tags