Sha256: c1cf486fb945fffb338fd6f0b71a0293583a4a8b3ecf2ba794c7bd585e3bd839
Contents?: true
Size: 219 Bytes
Versions: 1
Compression:
Stored size: 219 Bytes
Contents
class CurrentPasswordValidator < ActiveModel::EachValidator def validate_each(record, attribute, value) record.errors.add attribute, 'The password is incorrect.' unless Current.user&.authenticate(value) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
kaze-0.5.0 | stubs/default/app/validators/current_password_validator.rb |