Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement