aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorAkshay Vishnoi <akshay.vishnoi@vinsol.com>2014-07-04 03:00:09 +0530
committerAkshay Vishnoi <akshay.vishnoi@vinsol.com>2014-07-04 03:00:09 +0530
commit3ac3760c69e6e6914c5ddae138856b3c82ac0f20 (patch)
treea8b4ba1b24397bdbed9c9af2594ebf780757a166 /guides
parentd4422c36ca265c076825e2ad94511f4e900c3015 (diff)
downloadrails-3ac3760c69e6e6914c5ddae138856b3c82ac0f20.tar.gz
rails-3ac3760c69e6e6914c5ddae138856b3c82ac0f20.tar.bz2
rails-3ac3760c69e6e6914c5ddae138856b3c82ac0f20.zip
[ci skip] /javascript/ -> JavaScript - cover whole app
Diffstat (limited to 'guides')
-rw-r--r--guides/source/generators.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/guides/source/generators.md b/guides/source/generators.md
index 25c67de993..93fb5eece8 100644
--- a/guides/source/generators.md
+++ b/guides/source/generators.md
@@ -207,7 +207,7 @@ $ bin/rails generate scaffold User name:string
Looking at this output, it's easy to understand how generators work in Rails 3.0 and above. The scaffold generator doesn't actually generate anything, it just invokes others to do the work. This allows us to add/replace/remove any of those invocations. For instance, the scaffold generator invokes the scaffold_controller generator, which invokes erb, test_unit and helper generators. Since each generator has a single responsibility, they are easy to reuse, avoiding code duplication.
-Our first customization on the workflow will be to stop generating stylesheets, javascripts and test fixtures for scaffolds. We can achieve that by changing our configuration to the following:
+Our first customization on the workflow will be to stop generating stylesheet, JavaScript and test fixture files for scaffolds. We can achieve that by changing our configuration to the following:
```ruby
config.generators do |g|
@@ -219,7 +219,7 @@ config.generators do |g|
end
```
-If we generate another resource with the scaffold generator, we can see that stylesheets, javascripts and fixtures are not created anymore. If you want to customize it further, for example to use DataMapper and RSpec instead of Active Record and TestUnit, it's just a matter of adding their gems to your application and configuring your generators.
+If we generate another resource with the scaffold generator, we can see that stylesheet, JavaScript and fixture files are not created anymore. If you want to customize it further, for example to use DataMapper and RSpec instead of Active Record and TestUnit, it's just a matter of adding their gems to your application and configuring your generators.
To demonstrate this, we are going to create a new helper generator that simply adds some instance variable readers. First, we create a generator within the rails namespace, as this is where rails searches for generators used as hooks: