Skip to content

Commit 83d67fb

Browse files
authored
vcs url error now displayed in edit application page (#518)
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 f7e2a9d commit 83d67fb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/controllers/questionnaires_controller.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,13 @@ def update
9191
update_params = questionnaire_params
9292
update_params = convert_school_name_to_id(update_params)
9393

94+
@agreements = Agreement.all
9495
respond_to do |format|
9596
if @questionnaire.update_attributes(update_params)
9697
format.html { redirect_to questionnaires_path, notice: 'Application was successfully updated.' }
9798
format.json { head :no_content }
9899
else
99-
format.html { redirect_to edit_questionnaires_url }
100+
format.html { render action: "edit" }
100101
format.json { render json: @questionnaire.errors, status: :unprocessable_entity }
101102
end
102103
end

0 commit comments

Comments
 (0)