aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/generators/test_unit/mailer/templates/preview.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/rails/generators/test_unit/mailer/templates/preview.rb')
-rw-r--r--railties/lib/rails/generators/test_unit/mailer/templates/preview.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/railties/lib/rails/generators/test_unit/mailer/templates/preview.rb b/railties/lib/rails/generators/test_unit/mailer/templates/preview.rb
new file mode 100644
index 0000000000..3bfd5426e8
--- /dev/null
+++ b/railties/lib/rails/generators/test_unit/mailer/templates/preview.rb
@@ -0,0 +1,13 @@
+<% module_namespacing do -%>
+# Preview all emails at http://localhost:3000/rails/mailers/<%= file_path %>
+class <%= class_name %>Preview < ActionMailer::Preview
+<% actions.each do |action| -%>
+
+ # Preview this email at http://localhost:3000/rails/mailers/<%= file_path %>/<%= action %>
+ def <%= action %>
+ <%= class_name %>.<%= action %>
+ end
+<% end -%>
+
+end
+<% end -%>