Class: Balrog::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Balrog::InstallGenerator
- Defined in:
- lib/balrog/generators/install_generator.rb
Instance Method Summary collapse
Instance Method Details
#create_initializer_file ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/balrog/generators/install_generator.rb', line 6 def create_initializer_file password_hash = PasswordHasher.encrypt_password contents = <<~EOF Balrog::Middleware.setup do |config| config.set_password_hash '#{password_hash}' config.set_session_expiry 30.minutes end EOF create_file "config/initializers/balrog.rb", contents end |