# File lib/active_model/secure_password.rb, line 34 def has_secure_password # Load bcrypt-ruby only when has_secured_password is used to avoid make ActiveModel # (and by extension the entire framework) dependent on a binary library. gem 'bcrypt-ruby', '~> 3.0.0' require 'bcrypt' attr_reader :password validates_confirmation_of :password validates_presence_of :password_digest include InstanceMethodsOnActivation if respond_to?(:attributes_protected_by_default) def self.attributes_protected_by_default super + ['password_digest'] end end end