Class: SsoClient::Generators::InstallGenerator

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.next_migration_number(dirname) ⇒ Object



11
12
13
# File 'lib/generators/sso_client/install/install_generator.rb', line 11

def self.next_migration_number(dirname)
  Time.now.strftime('%Y%m%d%H%M%S')
end

Instance Method Details

#create_migrationObject



19
20
21
# File 'lib/generators/sso_client/install/install_generator.rb', line 19

def create_migration
  migration_template 'migration.rb', 'db/migrate/sso_create_users.rb'
end

#create_modelsObject



15
16
17
# File 'lib/generators/sso_client/install/install_generator.rb', line 15

def create_models
  template 'model.rb', 'app/models/user.rb'
end