class Rodauth::OAuth::Rails::Generators::InstallGenerator

  1. lib/generators/rodauth/oauth/install_generator.rb
Superclass: Rails::Generators::Base

Included modules

  1. ::Rails::Generators::Migration

Public Class methods

next_migration_number(dirname)

required by migration_template action

[show source]
   # File lib/generators/rodauth/oauth/install_generator.rb
31 def self.next_migration_number(dirname)
32   ActiveRecord::Generators::Base.next_migration_number(dirname)
33 end

Public Instance methods

create_oauth_models()
[show source]
   # File lib/generators/rodauth/oauth/install_generator.rb
21 def create_oauth_models
22   return unless defined?(ActiveRecord::Base)
23 
24   template "app/models/oauth_application.rb"
25   template "app/models/oauth_grant.rb"
26 end
create_rodauth_migration()
[show source]
   # File lib/generators/rodauth/oauth/install_generator.rb
15 def create_rodauth_migration
16   return unless defined?(ActiveRecord::Base)
17 
18   migration_template "db/migrate/create_rodauth_oauth.rb", "db/migrate/create_rodauth_oauth.rb"
19 end