Class: Hancock::News::MigrationsGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Hancock::News::MigrationsGenerator
- Includes:
- ActiveRecord::Generators::Migration
- Defined in:
- lib/generators/hancock/news/migrations/migrations_generator.rb
Instance Method Summary collapse
Instance Method Details
#migrations ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/generators/hancock/news/migrations/migrations_generator.rb', line 10 def migrations if Hancock::News.active_record? %w(news).each do |table_name| migration_template "migration_#{table_name}.rb", "db/migrate/hancock_news_create_#{table_name}.rb" end end end |