Class: Rodauth::OAuth::Rails::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Rodauth::OAuth::Rails::Generators::InstallGenerator
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/rodauth/oauth/install_generator.rb
Class Method Summary collapse
-
.next_migration_number(dirname) ⇒ Object
required by #migration_template action.
Instance Method Summary collapse
Class Method Details
.next_migration_number(dirname) ⇒ Object
required by #migration_template action
31 32 33 |
# File 'lib/generators/rodauth/oauth/install_generator.rb', line 31 def self.next_migration_number(dirname) ActiveRecord::Generators::Base.next_migration_number(dirname) end |
Instance Method Details
#create_oauth_models ⇒ Object
21 22 23 24 25 26 |
# File 'lib/generators/rodauth/oauth/install_generator.rb', line 21 def create_oauth_models return unless defined?(ActiveRecord::Base) template "app/models/oauth_application.rb" template "app/models/oauth_grant.rb" end |
#create_rodauth_migration ⇒ Object
15 16 17 18 19 |
# File 'lib/generators/rodauth/oauth/install_generator.rb', line 15 def create_rodauth_migration return unless defined?(ActiveRecord::Base) migration_template "db/migrate/create_rodauth_oauth.rb", "db/migrate/create_rodauth_oauth.rb" end |