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 =
['content', 'taxonomy', 'upload', 'template', 'relation', 'metum', 'profile'].freeze
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.next_migration_number(dirname) ⇒ Object
21 22 23 |
# File 'lib/generators/active_content/install_generator.rb', line 21 def self.next_migration_number(dirname) ::ActiveRecord::Generators::Base.next_migration_number(dirname) end |
Instance Method Details
#create_migration_file ⇒ Object
15 16 17 18 19 |
# File 'lib/generators/active_content/install_generator.rb', line 15 def create_migration_file models.each do |model| migration_template "#{model}.rb", "db/migrate/create_#{model.pluralize}.rb" end end |