Reputation: 10079
I'm using Rails 3.1 to re-write a generator.
The Rails guide says to start with the following example:
class InitializerGenerator < Rails::Generators::Base
def create_initializer_file
create_file "config/initializers/initializer.rb", "# Add initialization content here"
end
end
However, the neither the Rails::Generators nor Rails::Generator namespace seem to be defined.
Is there a guide for Rails 3.1 generators?
Upvotes: 0
Views: 145