Skip to content

Commit 2ab1155

Browse files
committed
Update deprecated response type
1 parent 1df2021 commit 2ab1155

23 files changed

+41
-41
lines changed

app/controllers/better_together/calendars_controller.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def edit; end
2020
# if @calendar.save
2121
# redirect_to @calendar, notice: "Calendar was successfully created."
2222
# else
23-
# render :new, status: :unprocessable_entity
23+
# render :new, status: :unprocessable_content
2424
# end
2525
# end
2626

@@ -29,7 +29,7 @@ def edit; end
2929
# if @calendar.update(better_together_calendar_params)
3030
# redirect_to @calendar, notice: "Calendar was successfully updated.", status: :see_other
3131
# else
32-
# render :edit, status: :unprocessable_entity
32+
# render :edit, status: :unprocessable_content
3333
# end
3434
# end
3535

app/controllers/better_together/communities_controller.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def create # rubocop:todo Metrics/AbcSize, Metrics/MethodLength
3838
end
3939
else
4040
flash.now[:alert] = t('community.create_failed')
41-
format.html { render :edit, status: :unprocessable_entity }
41+
format.html { render :edit, status: :unprocessable_content }
4242
format.turbo_stream do
4343
render turbo_stream: [
4444
turbo_stream.update('form_errors', partial: 'layouts/better_together/errors',
@@ -62,7 +62,7 @@ def update # rubocop:todo Metrics/AbcSize, Metrics/MethodLength
6262
end
6363
else
6464
flash.now[:alert] = t('community.update_failed')
65-
format.html { render :new, status: :unprocessable_entity }
65+
format.html { render :new, status: :unprocessable_content }
6666
format.turbo_stream do
6767
render turbo_stream: [
6868
turbo_stream.update('form_errors', partial: 'layouts/better_together/errors',

app/controllers/better_together/geography/continents_controller.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def create # rubocop:todo Metrics/MethodLength
3636
locals: { object: @geography_continent }
3737
)
3838
end
39-
format.html { render :new, status: :unprocessable_entity }
39+
format.html { render :new, status: :unprocessable_content }
4040
end
4141
end
4242
end
@@ -54,7 +54,7 @@ def update # rubocop:todo Metrics/MethodLength
5454
locals: { object: @geography_continent }
5555
)
5656
end
57-
format.html { render :edit, status: :unprocessable_entity }
57+
format.html { render :edit, status: :unprocessable_content }
5858
end
5959
end
6060
end

app/controllers/better_together/geography/countries_controller.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def create # rubocop:todo Metrics/MethodLength
4343
locals: { object: @geography_country }
4444
)
4545
end
46-
format.html { render :new, status: :unprocessable_entity }
46+
format.html { render :new, status: :unprocessable_content }
4747
end
4848
end
4949
end
@@ -61,7 +61,7 @@ def update # rubocop:todo Metrics/MethodLength
6161
locals: { object: @geography_country }
6262
)
6363
end
64-
format.html { render :edit, status: :unprocessable_entity }
64+
format.html { render :edit, status: :unprocessable_content }
6565
end
6666
end
6767
end

app/controllers/better_together/geography/region_settlements_controller.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def create # rubocop:todo Metrics/MethodLength
3636
locals: { object: @geography_region_settlement }
3737
)
3838
end
39-
format.html { render :new, status: :unprocessable_entity }
39+
format.html { render :new, status: :unprocessable_content }
4040
end
4141
end
4242
end
@@ -55,7 +55,7 @@ def update # rubocop:todo Metrics/MethodLength
5555
locals: { object: @geography_region_settlement }
5656
)
5757
end
58-
format.html { render :edit, status: :unprocessable_entity }
58+
format.html { render :edit, status: :unprocessable_content }
5959
end
6060
end
6161
end

app/controllers/better_together/geography/regions_controller.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def create # rubocop:todo Metrics/MethodLength
4343
locals: { object: @geography_region }
4444
)
4545
end
46-
format.html { render :new, status: :unprocessable_entity }
46+
format.html { render :new, status: :unprocessable_content }
4747
end
4848
end
4949
end
@@ -61,7 +61,7 @@ def update # rubocop:todo Metrics/MethodLength
6161
locals: { object: @geography_region }
6262
)
6363
end
64-
format.html { render :edit, status: :unprocessable_entity }
64+
format.html { render :edit, status: :unprocessable_content }
6565
end
6666
end
6767
end

app/controllers/better_together/geography/settlements_controller.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def create # rubocop:todo Metrics/MethodLength
4343
locals: { object: @geography_settlement }
4444
)
4545
end
46-
format.html { render :new, status: :unprocessable_entity }
46+
format.html { render :new, status: :unprocessable_content }
4747
end
4848
end
4949
end
@@ -61,7 +61,7 @@ def update # rubocop:todo Metrics/MethodLength
6161
locals: { object: @geography_settlement }
6262
)
6363
end
64-
format.html { render :edit, status: :unprocessable_entity }
64+
format.html { render :edit, status: :unprocessable_content }
6565
end
6666
end
6767
end

app/controllers/better_together/geography/states_controller.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def create # rubocop:todo Metrics/MethodLength
4141
locals: { object: @geography_state }
4242
)
4343
end
44-
format.html { render :new, status: :unprocessable_entity }
44+
format.html { render :new, status: :unprocessable_content }
4545
end
4646
end
4747
end
@@ -59,7 +59,7 @@ def update # rubocop:todo Metrics/MethodLength
5959
locals: { object: @geography_state }
6060
)
6161
end
62-
format.html { render :edit, status: :unprocessable_entity }
62+
format.html { render :edit, status: :unprocessable_content }
6363
end
6464
end
6565
end

app/controllers/better_together/metrics/link_click_reports_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def create # rubocop:todo Metrics/AbcSize, Metrics/MethodLength
5656
end
5757
else
5858
flash.now[:alert] = t('flash.generic.error_create', resource: t('resources.report'))
59-
format.html { render :new, status: :unprocessable_entity }
59+
format.html { render :new, status: :unprocessable_content }
6060
format.turbo_stream do
6161
render turbo_stream: [
6262
turbo_stream.update('form_errors',

app/controllers/better_together/metrics/page_view_reports_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def create # rubocop:todo Metrics/AbcSize, Metrics/MethodLength
5656
end
5757
else
5858
flash.now[:alert] = t('flash.generic.error_create', resource: t('resources.report'))
59-
format.html { render :new, status: :unprocessable_entity }
59+
format.html { render :new, status: :unprocessable_content }
6060
format.turbo_stream do
6161
render turbo_stream: [
6262
turbo_stream.update('form_errors',

0 commit comments

Comments
 (0)