X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/84765f2e6de42bc188139cfa9fae77a233df2d68..c446ca287b7dfa79cf1722ffe950f9a38e4f74d3:/app/controllers/accounts_controller.rb diff --git a/app/controllers/accounts_controller.rb b/app/controllers/accounts_controller.rb index 085d1bfea..e2a82c20e 100644 --- a/app/controllers/accounts_controller.rb +++ b/app/controllers/accounts_controller.rb @@ -12,10 +12,10 @@ class AccountsController < ApplicationController before_action :check_database_readable before_action :check_database_writable, :only => [:update] - allow_thirdparty_images :only => [:edit, :update] - allow_social_login :only => [:edit, :update] + allow_thirdparty_images :only => [:show, :update] + allow_social_login :only => [:show, :update] - def edit + def show if errors = session.delete(:user_errors) errors.each do |attribute, error| current_user.errors.add(attribute, error) @@ -31,10 +31,10 @@ class AccountsController < ApplicationController (params[:user][:auth_provider] == current_user.auth_provider && params[:user][:auth_uid] == current_user.auth_uid) update_user(current_user, user_params) - if current_user.errors.count.zero? - redirect_to edit_account_path + if current_user.errors.empty? + redirect_to account_path else - render :edit + render :show end else session[:new_user_settings] = user_params.to_h