Class: NameCredentialEditForm
- Inherits:
-
ActiveForm
- Object
- ActiveForm
- NameCredentialEditForm
- Defined in:
- app/models/name_credential_edit_form.rb
Constant Summary collapse
- PasswordLengthRange =
4..20
- PasswordPattern =
/\A[\x21-\x7E]+\z/
Instance Method Summary collapse
Instance Method Details
#masked_password ⇒ Object
30 31 32 |
# File 'app/models/name_credential_edit_form.rb', line 30 def masked_password return self.password.to_s.gsub(/./, "*") end |
#to_name_credential_hash ⇒ Object
34 35 36 37 38 39 |
# File 'app/models/name_credential_edit_form.rb', line 34 def to_name_credential_hash return { :name => self.name, :hashed_password => NameCredential.create_hashed_password(self.password.to_s), } end |