Class: PasskeysRails::Generators::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/passkeys_rails/install_generator.rb

Instance Method Summary collapse

Instance Method Details

#add_routesObject



14
15
16
# File 'lib/generators/passkeys_rails/install_generator.rb', line 14

def add_routes
  route 'mount PasskeysRails::Engine => "/passkeys"'
end

#copy_configObject



9
10
11
# File 'lib/generators/passkeys_rails/install_generator.rb', line 9

def copy_config
  template 'passkeys_rails_config.rb', "config/initializers/passkeys_rails.rb"
end

#copy_migrationsObject



19
20
21
# File 'lib/generators/passkeys_rails/install_generator.rb', line 19

def copy_migrations
  rake("passkeys_rails:install:migrations")
end

#show_readmeObject



24
25
26
# File 'lib/generators/passkeys_rails/install_generator.rb', line 24

def show_readme
  readme "README" if behavior == :invoke
end