Class: RocketCms::MigrationGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- RocketCms::MigrationGenerator
- Includes:
- ActiveRecord::Generators::Migration
- Defined in:
- lib/generators/rocket_cms/migration_generator.rb
Instance Method Summary collapse
Instance Method Details
#install ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/generators/rocket_cms/migration_generator.rb', line 10 def install if RocketCMS.active_record? %w(contact_messages news pages seos).each do |table_name| migration_template "migration_#{table_name}.rb", "db/migrate/rocket_cms_create_#{table_name}.rb" end end end |