Class: CMS::Generators::MigrationGenerator
- Inherits:
-
ContentTypes
- Object
- Rails::Generators::Base
- Base
- ContentTypes
- CMS::Generators::MigrationGenerator
- Defined in:
- lib/generators/cms/migration_generator.rb
Instance Method Summary collapse
Methods inherited from Base
Instance Method Details
#create_migration_file ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/generators/cms/migration_generator.rb', line 9 def create_migration_file @migration_types = CMS::Configuration.scoped_types() if [:only].present? migration_template 'migration.rb', "db/migrate/create_#{[:only].underscore.pluralize}" else migration_template 'migration.rb', 'db/migrate/create_cms' end end |