Skip to content
This repository
Browse code

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

…fo ino the generators guide
  • Loading branch information...
commit b640e3f5107b68e62967cba20e5f627170d98460 1 parent 3c7a33c
Ryan Bigg authored

Showing 1 changed file with 2 additions and 0 deletions. Show diff stats Hide diff stats

  1. 2  railties/guides/source/generators.textile
2  railties/guides/source/generators.textile
Source Rendered
@@ -45,6 +45,8 @@ class InitializerGenerator < Rails::Generators::Base
45 45
 end
46 46
 </ruby>
47 47
 
  48
+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.
  49
+
48 50
 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.
49 51
 
50 52
 To invoke our new generator, we just need to do:

0 notes on commit b640e3f

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