From 2594581e9f5594b32918326be895b4d443ab3e9c Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Tue, 7 Dec 2004 11:49:38 +0000 Subject: Added a better generator for scaffolding that actually creates the code, so it can be edited bit by bit. See "script/generate scaffold" [bitsweat]. Added a whole new approach to generators that used the shared "script/generate" command. Run with no-args to see help [bitsweat]. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@63 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- railties/generators/mailer/USAGE | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 railties/generators/mailer/USAGE (limited to 'railties/generators/mailer/USAGE') diff --git a/railties/generators/mailer/USAGE b/railties/generators/mailer/USAGE new file mode 100644 index 0000000000..b6f2bbd54b --- /dev/null +++ b/railties/generators/mailer/USAGE @@ -0,0 +1,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. -- cgit v1.2.3