Class: SmartSettings::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Includes:
Rails::Generators::Migration
Defined in:
lib/generators/smart_settings/install_generator.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.next_migration_number(dirname) ⇒ Object



17
18
19
# File 'lib/generators/smart_settings/install_generator.rb', line 17

def self.next_migration_number(dirname)
  ::ActiveRecord::Generators::Base.next_migration_number(dirname)
end

Instance Method Details

#create_migration_fileObject



12
13
14
15
# File 'lib/generators/smart_settings/install_generator.rb', line 12

def create_migration_file
  template 'model.rb', 'app/models/setting.rb'
  migration_template 'migration.rb', 'db/migrate/create_settings.rb'
end