Class: Doorkeeper::ApplicationOwnerGenerator

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

Overview

Generates migration to add reference to owner of the Doorkeeper application.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.next_migration_number(dirname) ⇒ Object


23
24
25
# File 'lib/generators/doorkeeper/application_owner_generator.rb', line 23

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

Instance Method Details

#application_ownerObject


15
16
17
18
19
20
21
# File 'lib/generators/doorkeeper/application_owner_generator.rb', line 15

def application_owner
  migration_template(
    "add_owner_to_application_migration.rb.erb",
    "db/migrate/add_owner_to_application.rb",
    migration_version: migration_version,
  )
end