Sha256: b56ef324bffa5c9344ea067a9b4eb028c1918643c3667633c208d62fa21dbf89
Contents?: true
Size: 459 Bytes
Versions: 7
Compression:
Stored size: 459 Bytes
Contents
module Trestle module Auth module ModelMethods extend ActiveSupport::Concern extend ActiveSupport::Autoload autoload :Rememberable included do has_secure_password end module ClassMethods def authenticate(identifier, password) user = find_by(Trestle.config.auth.authenticate_with => identifier) || NullUser.new user.authenticate(password) end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems