Skip to content

Commit dbaf23a

Browse files
JeremyRudmancbaudouinjr
authored andcommitted
vcs url error now displayed in edit application page
changed from redirect_to to render "edit" on error. redirect_to makes a fresh request which causes the error information to be lost
1 parent 2726945 commit dbaf23a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/controllers/questionnaires_controller.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,13 @@ def create
8383
def update
8484
update_params = questionnaire_params
8585
update_params = convert_school_name_to_id(update_params)
86-
86+
@agreements = Agreement.all
8787
respond_to do |format|
8888
if @questionnaire.update_attributes(update_params)
8989
format.html { redirect_to questionnaires_path, notice: 'Application was successfully updated.' }
9090
format.json { head :no_content }
9191
else
92-
format.html { redirect_to edit_questionnaires_url }
92+
format.html { render action: "edit" }
9393
format.json { render json: @questionnaire.errors, status: :unprocessable_entity }
9494
end
9595
end

0 commit comments

Comments
 (0)