From b640e3f5107b68e62967cba20e5f627170d98460 Mon Sep 17 00:00:00 2001 From: Ryan Bigg Date: Wed, 1 Dec 2010 13:48:33 +1100 Subject: [PATCH] Mention that the documentation of create_file can be found on rdoc.info ino the generators guide --- railties/guides/source/generators.textile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/railties/guides/source/generators.textile b/railties/guides/source/generators.textile index 99c34ed30f..909c79f3cb 100644 --- a/railties/guides/source/generators.textile +++ b/railties/guides/source/generators.textile @@ -45,6 +45,8 @@ class InitializerGenerator < Rails::Generators::Base end +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: