Skip to content

Commit c0a6963

Browse files
committed
[skip-ci] adding missing config generator line to prevent creating stylesheets inside generators.rb (section: Customizing Your Workflow)
1 parent 05c3f84 commit c0a6963

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

guides/source/generators.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,10 +215,11 @@ config.generators do |g|
215215
g.orm :active_record
216216
g.template_engine :erb
217217
g.test_framework :test_unit, fixture: false
218+
g.stylesheets false
218219
end
219220
```
220221

221-
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.
222+
If we generate another resource with the scaffold generator, we can see that stylesheet 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.
222223

223224
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:
224225

0 commit comments

Comments
 (0)