Class: Auth::PasswordUpdateForm

Inherits:
ApplicationForm show all
Defined in:
app/forms/auth/password_update_form.rb

Instance Attribute Summary

Attributes inherited from ApplicationForm

#raw_responce

Instance Method Summary collapse

Methods inherited from ApplicationForm

#persisted?

Instance Method Details

#submitObject



14
15
16
17
18
19
20
21
22
23
24
# File 'app/forms/auth/password_update_form.rb', line 14

def submit
  return false unless valid?

  params = attributes
  params[:id] ||= params.try(:delete, :reset_password_token) if params[:reset_password_token].present?
  merge_responce! TranslationCms::Api::Password.requestor.update(
    TranslationCms::Api::Password.new(params)
  )
  # api_answer = TranslationCms::Api::Customer.reset_password_by_token(attributes)
  errors.empty?
end