File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
lib/generators/rails/templates Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ def create
3636 format.html { redirect_to @<%= singular_table_name %> , notice : <%= %("#{ human_name } was successfully created.") %> }
3737 format.json { render :show, status: :created, location: <%= "@#{ singular_table_name } " %> }
3838 else
39- format . html { render :new }
39+ format . html { render :new , status : :unprocessable_entity }
4040 format . json { render json : <%= "@#{ orm_instance . errors } " %>, status: :unprocessable_entity }
4141 end
4242 end
@@ -50,7 +50,7 @@ def update
5050 format . html { redirect_to @<%= singular_table_name %>, notice : <%= %("#{ human_name } was successfully updated.") %> }
5151 format.json { render :show, status: :ok, location: <%= "@#{ singular_table_name } " %> }
5252 else
53- format . html { render :edit }
53+ format . html { render :edit , status : :unprocessable_entity }
5454 format . json { render json : <%= "@#{ orm_instance . errors } " %>, status: :unprocessable_entity }
5555 end
5656 end
You can’t perform that action at this time.
0 commit comments