I thought I understood the difference between require
and include
with the help of this this thread.
Then I stumbled on this piece of code from the github page of the bcrypt-ruby gem. Why are they using both methods? So first single models are going to be loaded but then again through include
all the functions?
require 'bcrypt'
class User < ActiveRecord::Base
# users.password_hash in the database is a :string
include BCrypt
.....