Skip to content

Commit de7f93b

Browse files
Bump rubocop-rails from 2.33.4 to 2.34.3 (#5548)
* Bump rubocop-rails from 2.33.4 to 2.34.3 Bumps [rubocop-rails](https://github.com/rubocop/rubocop-rails) from 2.33.4 to 2.34.3. - [Release notes](https://github.com/rubocop/rubocop-rails/releases) - [Changelog](https://github.com/rubocop/rubocop-rails/blob/master/CHANGELOG.md) - [Commits](rubocop/rubocop-rails@v2.33.4...v2.34.3) --- updated-dependencies: - dependency-name: rubocop-rails dependency-version: 2.34.3 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Fix lint errors --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Daniel Orner <daniel.orner@flipp.com>
1 parent 8c75530 commit de7f93b

17 files changed

Lines changed: 48 additions & 52 deletions

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ group :development, :test do
156156
gem "rubocop"
157157
# Rails add-on for static analysis.
158158
gem 'rubocop-performance'
159-
gem "rubocop-rails", "~> 2.33.4"
159+
gem "rubocop-rails", "~> 2.34.3"
160160
# More concise test ("should") matchers
161161
gem "shoulda-matchers", "~> 7.0"
162162
# Default rules for Rubocop.

Gemfile.lock

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ GEM
342342
actionview (>= 7.0.0)
343343
activesupport (>= 7.0.0)
344344
jmespath (1.6.2)
345-
json (2.19.3)
345+
json (2.19.4)
346346
jwt (3.1.2)
347347
base64
348348
kaminari (1.2.2)
@@ -472,7 +472,7 @@ GEM
472472
paper_trail (17.0.0)
473473
activerecord (>= 7.1)
474474
request_store (~> 1.4)
475-
parallel (1.27.0)
475+
parallel (1.28.0)
476476
parser (3.3.11.1)
477477
ast (~> 2.4.1)
478478
racc
@@ -586,7 +586,7 @@ GEM
586586
psych (>= 4.0.0)
587587
tsort
588588
recaptcha (5.21.1)
589-
regexp_parser (2.11.3)
589+
regexp_parser (2.12.0)
590590
reline (0.6.3)
591591
io-console (~> 0.5)
592592
request_store (1.7.0)
@@ -636,7 +636,7 @@ GEM
636636
lint_roller (~> 1.1)
637637
rubocop (>= 1.75.0, < 2.0)
638638
rubocop-ast (>= 1.47.1, < 2.0)
639-
rubocop-rails (2.33.4)
639+
rubocop-rails (2.34.3)
640640
activesupport (>= 4.2.0)
641641
lint_roller (~> 1.1)
642642
rack (>= 1.1)
@@ -710,9 +710,9 @@ GEM
710710
standard-performance (1.9.0)
711711
lint_roller (~> 1.1)
712712
rubocop-performance (~> 1.26.0)
713-
standard-rails (1.5.0)
713+
standard-rails (1.6.0)
714714
lint_roller (~> 1.0)
715-
rubocop-rails (~> 2.33.4)
715+
rubocop-rails (~> 2.34.0)
716716
stimulus-rails (1.3.4)
717717
railties (>= 6.0.0)
718718
stringio (3.2.0)
@@ -838,7 +838,7 @@ DEPENDENCIES
838838
rspec-rails (~> 8.0.2)
839839
rubocop
840840
rubocop-performance
841-
rubocop-rails (~> 2.33.4)
841+
rubocop-rails (~> 2.34.3)
842842
sass-rails
843843
shoulda-matchers (~> 7.0)
844844
simple_form

app/controllers/admin/users_controller.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def update
2424
redirect_to admin_users_path
2525
else
2626
flash[:error] = "Something didn't work quite right -- try again?"
27-
redirect_back(fallback_location: edit_admin_user_path)
27+
redirect_back_or_to(edit_admin_user_path)
2828
end
2929
end
3030

@@ -81,23 +81,23 @@ def add_role
8181
resource_type: params[:resource_type],
8282
resource_id: params[:resource_id])
8383
rescue => e
84-
redirect_back(fallback_location: admin_users_path, alert: e.message)
84+
redirect_back_or_to(admin_users_path, alert: e.message)
8585
return
8686
end
87-
redirect_back(fallback_location: admin_users_path, notice: "Role added!")
87+
redirect_back_or_to(admin_users_path, notice: "Role added!")
8888
end
8989

9090
def resend_invitation
9191
user = User.find(params[:user_id])
9292
user.invite!
93-
redirect_back(fallback_location: admin_users_path, notice: "#{user.name} reinvited!")
93+
redirect_back_or_to(admin_users_path, notice: "#{user.name} reinvited!")
9494
end
9595

9696
def remove_role
9797
RemoveRoleService.call(user_id: params[:user_id], role_id: params[:role_id])
98-
redirect_back(fallback_location: admin_users_path, notice: "Role removed!")
98+
redirect_back_or_to(admin_users_path, notice: "Role removed!")
9999
rescue => e
100-
redirect_back(fallback_location: admin_users_path, alert: e.message)
100+
redirect_back_or_to(admin_users_path, alert: e.message)
101101
end
102102

103103
private

app/controllers/application_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class ApplicationController < ActionController::Base
1919

2020
def session_expired
2121
flash[:error] = "Your session expired. This could be due to leaving a page open for a long time, or having multiple tabs open. Try resubmitting."
22-
redirect_back fallback_location: root_path
22+
redirect_back_or_to(root_path)
2323
end
2424

2525
def current_organization

app/controllers/attachments_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ class AttachmentsController < ApplicationController
22
def destroy
33
ActiveStorage::Attachment.find(params[:id])&.purge
44

5-
redirect_back fallback_location: partners_path
5+
redirect_back_or_to(partners_path)
66
end
77
end

app/controllers/audits_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def finalize
3232
@audit.finalized!
3333
redirect_to audit_path(@audit), notice: "Audit is Finalized."
3434
rescue => e
35-
redirect_back(fallback_location: audits_path, alert: "Could not finalize audit: #{e.message}")
35+
redirect_back_or_to(audits_path, alert: "Could not finalize audit: #{e.message}")
3636
end
3737

3838
def update

app/controllers/concerns/importable.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def import_csv
3939
else
4040
flash[:error] = "No file was attached!"
4141
end
42-
redirect_back(fallback_location: { action: :index, organization_id: current_organization })
42+
redirect_back_or_to({ action: :index, organization_id: current_organization })
4343
end
4444

4545
private

app/controllers/distributions_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ def picked_up
272272
flash[:error] = 'Sorry, we encountered an error when trying to mark this distribution as being completed'
273273
end
274274

275-
redirect_back(fallback_location: distribution_path)
275+
redirect_back_or_to(distribution_path)
276276
end
277277

278278
def pickup_day

app/controllers/donation_sites_controller.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def create
2626
else
2727
flash.now[:error] = "Something didn't work quite right -- try again?"
2828
if request.format.turbo_stream?
29-
format.html { render partial: "donation_sites/new_modal", status: :unprocessable_entity }
29+
format.html { render partial: "donation_sites/new_modal", status: :unprocessable_content }
3030
end
3131

3232
format.html do
@@ -69,7 +69,7 @@ def deactivate
6969
donation_site.deactivate!
7070
rescue => e
7171
flash[:error] = e.message
72-
redirect_back(fallback_location: donation_sites_path)
72+
redirect_back_or_to(donation_sites_path)
7373
return
7474
end
7575

@@ -83,7 +83,7 @@ def reactivate
8383
donation_site.reactivate!
8484
rescue => e
8585
flash[:error] = e.message
86-
redirect_back(fallback_location: donation_sites_path)
86+
redirect_back_or_to(donation_sites_path)
8787
return
8888
end
8989

app/controllers/items_controller.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def deactivate
9595
item.deactivate!
9696
rescue => e
9797
flash[:error] = e.message
98-
redirect_back(fallback_location: items_path)
98+
redirect_back_or_to(items_path)
9999
return
100100
end
101101

@@ -108,7 +108,7 @@ def destroy
108108
item.destroy
109109
if item.errors.any?
110110
flash[:error] = item.errors.full_messages.join("\n")
111-
redirect_back(fallback_location: items_path)
111+
redirect_back_or_to(items_path)
112112
return
113113
end
114114

0 commit comments

Comments
 (0)