Skip to content

Commit 7e8f9d1

Browse files
authored
5328 Fix deprecation warnings in specs (#5335)
* AdminLTE.css: replace deprecated 'color-adjust' by 'print-color-adjust' * HTTP response status code: replace deprecated 'unprocessable_entity' by 'unprocessable_content' * Remove old 'new_framework_defaults' files for updating to Rails 5.2. Currently on Rails 8.0.2 * ActiveSupport#to_time: new default setting for Rails 8.1
1 parent b67d30d commit 7e8f9d1

11 files changed

+12
-69
lines changed

app/assets/stylesheets/AdminLTE.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/assets/stylesheets/AdminLTE.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/controllers/admin/broadcast_announcements_controller.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def create
2424
if @broadcast_announcement.save
2525
format.html { redirect_to admin_broadcast_announcements_url, notice: "Broadcast announcement was successfully created." }
2626
else
27-
format.html { render :new, status: :unprocessable_entity }
27+
format.html { render :new, status: :unprocessable_content }
2828
end
2929
end
3030
end
@@ -34,7 +34,7 @@ def update
3434
if @broadcast_announcement.update(broadcast_announcement_params)
3535
format.html { redirect_to admin_broadcast_announcements_url, notice: "Broadcast announcement was successfully updated." }
3636
else
37-
format.html { render :edit, status: :unprocessable_entity }
37+
format.html { render :edit, status: :unprocessable_content }
3838
end
3939
end
4040
end

app/controllers/broadcast_announcements_controller.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def create
1919
if @broadcast_announcement.save
2020
format.html { redirect_to broadcast_announcements_url, notice: "Broadcast announcement was successfully created." }
2121
else
22-
format.html { render :new, status: :unprocessable_entity }
22+
format.html { render :new, status: :unprocessable_content }
2323
end
2424
end
2525
end
@@ -29,7 +29,7 @@ def update
2929
if @broadcast_announcement.update(broadcast_announcement_params)
3030
format.html { redirect_to broadcast_announcements_url, notice: "Broadcast announcement was successfully updated." }
3131
else
32-
format.html { render :edit, status: :unprocessable_entity }
32+
format.html { render :edit, status: :unprocessable_content }
3333
end
3434
end
3535
end

app/controllers/partners/individuals_requests_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def create
3030

3131
Rails.logger.info("[Request Creation Failure] partner_user_id=#{current_user.id} reason=#{@errors.full_messages}")
3232

33-
render :new, status: :unprocessable_entity
33+
render :new, status: :unprocessable_content
3434
end
3535
end
3636

app/controllers/partners/requests_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def create
4848

4949
Rails.logger.info("[Request Creation Failure] partner_user_id=#{current_user.id} reason=#{@errors.full_messages}")
5050

51-
render :new, status: :unprocessable_entity
51+
render :new, status: :unprocessable_content
5252
end
5353
end
5454

app/controllers/product_drives_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def destroy
9898
else
9999
error_message = product_drive.errors.full_messages.to_sentence
100100
format.html { redirect_to product_drive_path(product_drive), error: error_message }
101-
format.json { render json: {error: error_message}, status: :unprocessable_entity }
101+
format.json { render json: {error: error_message}, status: :unprocessable_content }
102102
end
103103
end
104104
end

app/controllers/transfers_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def validate
6666
body = render_to_string(partial: "transfers/validate_modal", formats: [:html], layout: false)
6767
render json: {valid: true, body: body}
6868
else
69-
render json: {valid: false}, status: :unprocessable_entity
69+
render json: {valid: false}, status: :unprocessable_content
7070
end
7171
end
7272

config/application.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,7 @@ class Application < Rails::Application
3333
# sidekiq worker that is only taking work from the `default`
3434
# queue.
3535
config.action_mailer.deliver_later_queue_name = 'default'
36+
37+
config.active_support.to_time_preserves_timezone = :zone # New default starting in Rails 8.1
3638
end
3739
end

config/initializers/new_framework_defaults.rb

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)