Class: Saasaparilla::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Saasaparilla::Generators::InstallGenerator
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/saasaparilla/install/install_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.next_migration_number(path) ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/generators/saasaparilla/install/install_generator.rb', line 8 def self.next_migration_number(path) unless @prev_migration_nr @prev_migration_nr = Time.now.utc.strftime("%Y%m%d%H%M%S").to_i else @prev_migration_nr += 1 end @prev_migration_nr.to_s end |
Instance Method Details
#copy_config ⇒ Object
23 24 25 |
# File 'lib/generators/saasaparilla/install/install_generator.rb', line 23 def copy_config copy_file 'saasaparilla.yml', 'config/saasaparilla.yml' end |
#copy_migrations ⇒ Object
17 18 19 20 21 |
# File 'lib/generators/saasaparilla/install/install_generator.rb', line 17 def copy_migrations migration_template "create_saasaparilla_tables.rb", "db/migrate/create_saasaparilla_tables.rb" end |