Commit 59e2f02e3fd452059b180e636b92cb1f6b0f42ca

Authored by Antonio Terceiro
1 parent b0d14e87

Properly rename Scrap::Notifier to ScrapNotifier

If we also don't rename the views directory, it won't find them.

See 926442b6d0c469ce6c73d5e32cf9c686e0fca5b4
app/mailers/scrap_notifier.rb
1   -class Scrap::Notifier < ActionMailer::Base
  1 +class ScrapNotifier < ActionMailer::Base
2 2 def notification(scrap)
3 3 sender, receiver = scrap.sender, scrap.receiver
4 4 @recipient = receiver.name
... ...
app/models/scrap.rb
... ... @@ -25,7 +25,7 @@ class Scrap &lt; 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/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 %>
app/views/scrap_notifier/notification.text.erb 0 → 100644
... ... @@ -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 %>
... ...