@@ -26,8 +26,8 @@ def update
2626 end
2727 else
2828 respond_to do |format |
29- format . html { render :edit , status : :unprocessable_entity }
30- format . json { render json : @casa_admin . errors . full_messages , status : :unprocessable_entity }
29+ format . html { render :edit , status : :unprocessable_content }
30+ format . json { render json : @casa_admin . errors . full_messages , status : :unprocessable_content }
3131 end
3232 end
3333 end
@@ -59,8 +59,8 @@ def create
5959 end
6060 rescue ActiveRecord ::RecordInvalid
6161 respond_to do |format |
62- format . html { render :new , status : :unprocessable_entity }
63- format . json { render json : service . casa_admin . errors . full_messages , status : :unprocessable_entity }
62+ format . html { render :new , status : :unprocessable_content }
63+ format . json { render json : service . casa_admin . errors . full_messages , status : :unprocessable_content }
6464 end
6565 end
6666 end
@@ -81,8 +81,8 @@ def activate
8181 end
8282 else
8383 respond_to do |format |
84- format . html { render :edit , status : :unprocessable_entity }
85- format . json { render json : @casa_admin . errors . full_messages , status : :unprocessable_entity }
84+ format . html { render :edit , status : :unprocessable_content }
85+ format . json { render json : @casa_admin . errors . full_messages , status : :unprocessable_content }
8686 end
8787 end
8888 rescue Errno ::ECONNREFUSED => error
@@ -100,8 +100,8 @@ def deactivate
100100 end
101101 else
102102 respond_to do |format |
103- format . html { render :edit , status : :unprocessable_entity }
104- format . json { render json : @casa_admin . errors . full_messages , status : :unprocessable_entity }
103+ format . html { render :edit , status : :unprocessable_content }
104+ format . json { render json : @casa_admin . errors . full_messages , status : :unprocessable_content }
105105 end
106106 end
107107 rescue Errno ::ECONNREFUSED => error
0 commit comments