Created
October 26, 2016 19:37
-
-
Save alishersadikov/7b817b280805e7cda7bf54fd362beb82 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To use Bcrypt: | |
uncomment "gem 'bcrypt', '~> 3.1.7'" in Gemfile | |
User model should have password_digest attribute | |
add "has_secure_password" to User | |
add "validates_confirmation_of :password" to User (if you have password confirmation which you should!) | |
To display flash messages: | |
add the following to views/layouts/application.html.erb right before yield line: | |
<% flash.each do |key, value| %> | |
<div class="alert -<%= key %>"> | |
<%= value %> | |
</div> | |
<% end %> | |
To use RSpec with Capybara: | |
add gem 'rspec-rails' and gem 'capybara' to Gemfile | |
in rails_helper.rb: require 'capybara/rails' and add "config.include Capybara::DSL" to config block | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment