Class: Doorkeeper::ApplicationScopesGenerator

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.next_migration_number(path) ⇒ Object


8
9
10
# File 'lib/generators/doorkeeper/application_scopes_generator.rb', line 8

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

Instance Method Details

#application_scopesObject


12
13
14
15
16
17
18
19
# File 'lib/generators/doorkeeper/application_scopes_generator.rb', line 12

def application_scopes
  if oauth_applications_exists? && !scopes_column_exists?
    migration_template(
      'add_scopes_to_oauth_applications.rb',
      'db/migrate/add_scopes_to_oauth_applications.rb'
    )
  end
end