Browse files

explain how to extend application templates. [ci skip]

  • Loading branch information...
1 parent e94be7b commit 3196ceaba28be64d890e9544af218481ad54cf16 @senny senny committed Jul 5, 2013
Showing with 19 additions and 0 deletions.
  1. +19 −0 guides/source/
19 guides/source/
@@ -227,3 +227,22 @@ git :init
git add: "."
git commit: "-a -m 'Initial commit'"
+Advanced Usage
+The application template is evaluated in the context of a
+`Rails::Generators::AppGenerator` instance. It uses the `apply` action
+provided by
+This means you can extend and change the instance to match your needs.
+For example by overwriting the `source_paths` method to contain the
+location of your template. Now methods like `copy_file` will accept
+relative paths to your template's location.
+def source_paths
+ [File.expand_path(File.dirname(__FILE__))]

0 comments on commit 3196cea

Please sign in to comment.