Class: Deimos::Generators::ActiveRecordGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Deimos::Generators::ActiveRecordGenerator
- Extended by:
- ActiveRecord::Generators::Migration
- Includes:
- ActiveRecord::Generators::Migration, Rails::Generators::Migration
- Defined in:
- lib/generators/deimos/active_record_generator.rb
Overview
Generator for ActiveRecord model and migration.
Instance Method Summary collapse
-
#generate ⇒ Object
:nodoc:.
Instance Method Details
#generate ⇒ Object
:nodoc:
73 74 75 76 |
# File 'lib/generators/deimos/active_record_generator.rb', line 73 def generate migration_template('migration.rb', "db/migrate/create_#{table_name.underscore}.rb") template('model.rb', "app/models/#{table_name.underscore}.rb") end |