Class: Devise::Api::Generators::InstallGenerator

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.next_migration_number(path) ⇒ Object



26
27
28
# File 'lib/devise/api/generators/install_generator.rb', line 26

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

Instance Method Details

#installObject



16
17
18
19
20
21
22
23
24
# File 'lib/devise/api/generators/install_generator.rb', line 16

def install
  migration_template(
    'migration.rb.erb',
    'db/migrate/create_devise_api_tables.rb',
    migration_version: migration_version
  )

  copy_file locale_source, locale_destination
end