Rename users.password to users.plain_text_password

Otherwise it conflicts with Devise
This commit is contained in:
Artur Beljajev 2018-07-13 23:09:21 +03:00
parent 22e70e7707
commit 32ecf36057
19 changed files with 32 additions and 24 deletions

View file

@ -7,7 +7,7 @@ class ApiUser < User
def epp_code_map
{
'2306' => [ # Parameter policy error
[:password, :blank]
[:plain_text_password, :blank]
]
}
end
@ -20,8 +20,8 @@ class ApiUser < User
belongs_to :registrar
has_many :certificates
validates :username, :password, :registrar, :roles, presence: true
validates :password, length: { minimum: min_password_length }
validates :username, :plain_text_password, :registrar, :roles, presence: true
validates :plain_text_password, length: { minimum: min_password_length }
validates :username, uniqueness: true
delegate :code, :name, to: :registrar, prefix: true