aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides/source/generators.textile
diff options
context:
space:
mode:
authorDavid N. Welton <davidw@dedasys.com>2010-11-22 16:05:53 +0100
committerDavid N. Welton <davidw@dedasys.com>2010-11-22 16:05:53 +0100
commit0598bd4d2db332e05fb4189169441fb1ad12e9b1 (patch)
tree6933556acab2a0cff6282b2769985e3e46319306 /railties/guides/source/generators.textile
parent8c17d30d687b0b9719d6998b1dc8144490132b8d (diff)
downloadrails-0598bd4d2db332e05fb4189169441fb1ad12e9b1.tar.gz
rails-0598bd4d2db332e05fb4189169441fb1ad12e9b1.tar.bz2
rails-0598bd4d2db332e05fb4189169441fb1ad12e9b1.zip
Explain that NamedBase makes the variable 'name' available to the script.
Diffstat (limited to 'railties/guides/source/generators.textile')
-rw-r--r--railties/guides/source/generators.textile2
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/guides/source/generators.textile b/railties/guides/source/generators.textile
index e0796d2f72..99c34ed30f 100644
--- a/railties/guides/source/generators.textile
+++ b/railties/guides/source/generators.textile
@@ -92,7 +92,7 @@ class InitializerGenerator < Rails::Generators::NamedBase
end
</ruby>
-First, notice that we are inheriting from +Rails::Generators::NamedBase+ instead of +Rails::Generators::Base+. This means that our generator expects at least one argument, which will be the name of the initializer.
+First, notice that we are inheriting from +Rails::Generators::NamedBase+ instead of +Rails::Generators::Base+. This means that our generator expects at least one argument, which will be the name of the initializer, and will be available in our code in the variable +name+.
We can see that by invoking the description of this new generator (don't forget to delete the old generator file):