class Doorkeeper::ApplicationScopesGenerator
Public Class Methods
next_migration_number(path)
click to toggle source
# File lib/generators/doorkeeper/application_scopes_generator.rb, line 8 def self.next_migration_number(path) ActiveRecord::Generators::Base.next_migration_number(path) end
Public Instance Methods
application_scopes()
click to toggle source
# 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
Private Instance Methods
oauth_applications_exists?()
click to toggle source
Might be running this before install
# File lib/generators/doorkeeper/application_scopes_generator.rb, line 31 def oauth_applications_exists? ActiveRecord::Base.connection.table_exists? :oauth_applications end
scopes_column_exists?()
click to toggle source
# File lib/generators/doorkeeper/application_scopes_generator.rb, line 23 def scopes_column_exists? ActiveRecord::Base.connection.column_exists?( :oauth_applications, :scopes ) end