Class: RailsJwtAuth::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- RailsJwtAuth::InstallGenerator
- Defined in:
- lib/generators/rails_jwt_auth/install_generator.rb
Instance Method Summary collapse
Instance Method Details
#create_initializer_file ⇒ Object
4 5 6 |
# File 'lib/generators/rails_jwt_auth/install_generator.rb', line 4 def create_initializer_file copy_file "initializer.rb", "config/initializers/rails_jwt_auth.rb" end |
#create_routes ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/generators/rails_jwt_auth/install_generator.rb', line 8 def create_routes route "resource :session, controller: 'rails_jwt_auth/sessions', only: [:create, :destroy]" route "resource :registration, controller: 'rails_jwt_auth/registrations', only: [:create, :update, :destroy]" route "resource :confirmation, controller: 'rails_jwt_auth/confirmations', only: [:show, :create]" route "resource :password, controller: 'rails_jwt_auth/passwords', only: [:create, :update]" end |