Permalink
Browse files

Explain that NamedBase makes the variable 'name' available to the scr…

…ipt.
  • Loading branch information...
1 parent 8c17d30 commit 0598bd4d2db332e05fb4189169441fb1ad12e9b1 @davidw davidw committed Nov 22, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 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):

0 comments on commit 0598bd4

Please sign in to comment.