method
enable_bcrypt
v8.0.0 -
Show latest stable
- Class:
Rails::Generators::AuthenticationGenerator
enable_bcrypt()public
No documentation available.
# File railties/lib/rails/generators/rails/authentication/authentication_generator.rb, line 41
def enable_bcrypt
if File.read("Gemfile").include?('gem "bcrypt"')
uncomment_lines "Gemfile", /gem "bcrypt"/
Bundler.with_original_env { execute_command :bundle, "install --quiet" }
else
Bundler.with_original_env { execute_command :bundle, "add bcrypt", capture: true }
end
end