Skip to content
Browse files

Mention that the documentation of create_file can be found on rdoc.in…

…fo ino the generators guide
  • Loading branch information...
1 parent 2b26ba6 commit 198c126d738b68f2c82f245e028cfeb3154edac9 @radar radar committed with fxn Dec 1, 2010
Showing with 2 additions and 0 deletions.
  1. +2 −0 railties/guides/source/generators.textile
View
2 railties/guides/source/generators.textile
@@ -45,6 +45,8 @@ class InitializerGenerator < Rails::Generators::Base
end
</ruby>
+NOTE: +create_file+ is a method provided by +Thor::Actions+ and the documentation for it and its brethren can be found at "rdoc.info":http://rdoc.info/github/wycats/thor/master/Thor/Actions.
+
Our new generator is quite simple: it inherits from +Rails::Generators::Base+ and has one method definition. Each public method in the generator is executed when a generator is invoked. Finally, we invoke the +create_file+ method that will create a file at the given destination with the given content. If you are familiar with the Rails Application Templates API, you'll feel right at home with the new generators API.
To invoke our new generator, we just need to do:

0 comments on commit 198c126

Please sign in to comment.
Something went wrong with that request. Please try again.