Class: ActiveContent::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- ActiveContent::InstallGenerator
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/active_content/install_generator.rb
Constant Summary collapse
- MODEL_NAMES =
Model names
['content', 'taxonomy', 'upload', 'template', 'relation', 'metum', 'profile'].freeze
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.next_migration_number(dirname) ⇒ Object
22 23 24 |
# File 'lib/generators/active_content/install_generator.rb', line 22 def self.next_migration_number(dirname) ::ActiveRecord::Generators::Base.next_migration_number(dirname) end |
Instance Method Details
#create_migration_file ⇒ Object
16 17 18 19 20 |
# File 'lib/generators/active_content/install_generator.rb', line 16 def create_migration_file models.each do |model| migration_template "#{model}.rb", "db/migrate/create_#{model.pluralize}.rb" end end |