rails 3 generators hand-rolled edition
Annoyed that rails 3 did none of the radical change of guard changes to default options? I know i was. Luckily its trivial to make right.
You can follow along by creating a new rails 3 application
rails new hand-rolled
At the end of the config/application.rb file add replacements
config.generators do |g|
g.orm :active_record
g.template_engine :erb
g.test_framework :rspec, :fixture => true
g.fixture_replacement :machinist
end
better yet you can now build a rails app passing templates for any manner of change you want to make by default.
generators = «-GENERATORS
config.generators do |g|
g.test_framework :rspec, :fixture => true, :views => false
g.integration_tool :rspec, :fixture => true, :views => true
end
The template file is passed to the rails new action and the generators are replaced. Match this up with the ease of generating your own generators package it up in a gem and you can create a set of rails application generators that suit your preferences while maintaining flexibility of context.