Class: RnStack::AuthGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- RnStack::AuthGenerator
- Defined in:
- lib/generators/rn_stack/auth/auth_generator.rb
Instance Method Summary collapse
Instance Method Details
#setup_auth ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/generators/rn_stack/auth/auth_generator.rb', line 5 def setup_auth say "Configuring Devise for Authentication..." # In a real-world scenario: # run "bundle add devise" # run "rails generate devise:install" # run "rails generate devise User" say "Adding Role-Based Authorization support (roles: user, admin)..." # This would typically involve generating a migration to add 'role' to the User model end |