Class: EmailCredentialEditForm
- Inherits:
-
ActiveForm
- Object
- ActiveForm
- EmailCredentialEditForm
- Defined in:
- app/models/email_credential_edit_form.rb
Overview
メール認証情報編集フォーム
Constant Summary collapse
- PasswordLengthRange =
4..20
- PasswordPattern =
/\A[\x21-\x7E]+\z/
Instance Method Summary collapse
Instance Method Details
#masked_password ⇒ Object
42 43 44 |
# File 'app/models/email_credential_edit_form.rb', line 42 def masked_password return self.password.to_s.gsub(/./, "*") end |
#to_email_credential_hash ⇒ Object
46 47 48 49 50 51 |
# File 'app/models/email_credential_edit_form.rb', line 46 def to_email_credential_hash return { :email => self.email, :hashed_password => EmailCredential.create_hashed_password(self.password.to_s), } end |