Class: DeviseWind::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- DeviseWind::Generators::InstallGenerator
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/devise_wind/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/devise_wind/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_migrations ⇒ Object
17 18 19 20 |
# File 'lib/generators/devise_wind/install/install_generator.rb', line 17 def copy_migrations migration_template "add_roles.rb", "db/migrate/add_roles.rb" migration_template "add_users_roles.rb", "db/migrate/add_users_roles.rb" end |