Commit a6005286

mo khan <mo@mokhan.ca>
2014-09-11 01:53:59
add configuration for view mail preview.
1 parent 013ab2e
Changed files (4)
app/views/notification_mailer/notification_email.html.erb
@@ -6,7 +6,7 @@
   <body>
     <h1>Hi <%= @user.name %>,</h1>
     <p>
-    You have new notification. Click <%= link_to "here", my_dashboard_url %> to see.
+    You have a new notification on Cakeside. Click <%= link_to "here", my_dashboard_url(protocol: 'https') %> to see.
     </p>
     <p>Have a wonderful day!</p>
   </body>
app/views/notification_mailer/notification_email.text.erb
@@ -1,6 +1,6 @@
 
 Hi <%= @user.name %>,
 
-You have new notification. Click <%= link_to "here", my_dashboard_url %> to see.
+You have new notification on Cakeside. Click <%= link_to "here", my_dashboard_url(protocol: 'https') %> to see.
 
 Have a wonderful day!
config/environments/development.rb
@@ -15,6 +15,7 @@ Rails.application.configure do
 
   # Don't care if the mailer can't send.
   config.action_mailer.raise_delivery_errors = false
+  config.action_mailer.preview_path = "#{Rails.root}/spec/mailers/previews"
 
   # Print deprecation notices to the Rails logger.
   config.active_support.deprecation = :log
spec/mailers/previews/notification_mailer_preview.rb
@@ -0,0 +1,5 @@
+class NotificationMailerPreview < ActionMailer::Preview
+  def notification_email
+    NotificationMailer.notification_email(Activity.last)
+  end
+end