Upgrade Rails to version 5.2.1 and adopt code & specs where necessary

Signed-off-by: Sebastian Serth <Sebastian.Serth@student.hpi.de>
This commit is contained in:
Sebastian Serth
2018-09-13 12:21:53 +02:00
parent 108190c242
commit de52db89f0
128 changed files with 786 additions and 422 deletions

View File

@ -21,7 +21,7 @@ class InternalUsersController < ApplicationController
if @user.update(params[:internal_user].permit(:password, :password_confirmation))
@user.change_password!(params[:internal_user][:password])
format.html { redirect_to(sign_in_path, notice: t('.success')) }
format.json { render(nothing: true, status: :ok) }
format.json { head :ok }
else
respond_with_invalid_object(format, object: @user, template: :reset_password)
end
@ -66,7 +66,7 @@ class InternalUsersController < ApplicationController
end
def internal_user_params
params[:internal_user].permit(:consumer_id, :email, :name, :role)
params[:internal_user].permit(:consumer_id, :email, :name, :role) if params[:internal_user].present?
end
private :internal_user_params
@ -105,7 +105,7 @@ class InternalUsersController < ApplicationController
if @user.update(params[:internal_user].permit(:password, :password_confirmation))
@user.activate!
format.html { redirect_to(sign_in_path, notice: t('.success')) }
format.json { render(nothing: true, status: :ok) }
format.json { head :ok }
else
respond_with_invalid_object(format, object: @user, template: :activate)
end