diff options
author | Lukas Eipert <git@leipert.io> | 2018-04-04 02:29:03 +0300 |
---|---|---|
committer | Lukas Eipert <git@leipert.io> | 2018-04-04 02:29:03 +0300 |
commit | 8128e3bad2e55d9b71e3f1cb57af1cca72b2e617 (patch) | |
tree | 4762f33863394eddc025fd313c836dce0604dfdf | |
parent | b8336995224cb58e8fedfb8578b80fb334c36000 (diff) |
use message on BE errors as well
-rw-r--r-- | app/controllers/profiles_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/profiles_controller.rb b/app/controllers/profiles_controller.rb index 499a5fc8a18..1eb86222779 100644 --- a/app/controllers/profiles_controller.rb +++ b/app/controllers/profiles_controller.rb @@ -63,7 +63,7 @@ class ProfilesController < Profiles::ApplicationController message = "Username change failed - #{result[:message]}" format.html { redirect_back_or_default(default: { action: 'show' }, options: { alert: message }) } - format.json { render json: result, status: :bad_request } + format.json { render json: { message: message }, status: :bad_request } end end end |