aboutsummaryrefslogtreecommitdiffstats
path: root/railties/generators/mailer/USAGE
blob: b6f2bbd54bd896b2b88140dd80c5bada72a636a2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
NAME
     new_mailer - create mailer and view stub files

SYNOPSIS
     new_mailer MailerName action [action ...]

DESCRIPTION
     The new_mailer generator takes the name of the new mailer class as the
     first argument and a variable number of mail action names as subsequent
     arguments.

     From the passed arguments, new_mailer generates a class file in
     app/models with a mail action for each of the mail action names passed.
     It then creates a mail test suite in test/unit with one stub test case
     and one stub fixture per mail action. Finally, it creates a template stub
     for each of the mail action names in app/views under a directory with the
     same name as the class.

EXAMPLE
     new_mailer Notifications signup forgot_password invoice

     This will generate a Notifications class in
     app/models/notifications.rb, a NotificationsTest in
     test/unit/notifications_test.rb, and signup, forgot_password, and invoice
     in test/fixture/notification. It will also create signup.rhtml,
     forgot_password.rhtml, and invoice.rhtml in app/views/notifications.
     
     The Notifications class will have the following methods: signup,
     forgot_password, and invoice.