From c99d83363f942e8c47189793507e3a816e87313f Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Mon, 10 Feb 2020 12:31:08 +0800 Subject: [PATCH] 1 --- app/controllers/users/authentication_applies_controller.rb | 2 +- app/forms/users/apply_authentication_form.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/users/authentication_applies_controller.rb b/app/controllers/users/authentication_applies_controller.rb index bf5aa0d40..9c3c6d859 100644 --- a/app/controllers/users/authentication_applies_controller.rb +++ b/app/controllers/users/authentication_applies_controller.rb @@ -6,7 +6,7 @@ class Users::AuthenticationAppliesController < Users::BaseAccountController Users::ApplyAuthenticationService.call(observed_user, create_params) render_ok rescue ApplicationService::Error => ex - render_error(ex.message) + tip_exception(ex.message) end def destroy diff --git a/app/forms/users/apply_authentication_form.rb b/app/forms/users/apply_authentication_form.rb index e55d6f295..c7c171e31 100644 --- a/app/forms/users/apply_authentication_form.rb +++ b/app/forms/users/apply_authentication_form.rb @@ -10,7 +10,7 @@ class Users::ApplyAuthenticationForm def validate_ID_number unless id_number =~ User::VALID_NUMBER_REGEX - raise(ActiveModel::ValidationError, "身份证格式不对") + raise("身份证格式不对") end end