Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update rails to 7.2.2 #2856

Merged
merged 9 commits into from
Dec 13, 2024
Merged

Update rails to 7.2.2 #2856

merged 9 commits into from
Dec 13, 2024

Conversation

kosiakkatrina
Copy link
Collaborator

No description provided.

@kosiakkatrina kosiakkatrina changed the title Update rails and puma Update rails to 7.2.2 Dec 6, 2024
Copy link

github-actions bot commented Dec 6, 2024

govuk_link_to "Clear", clear_filters_path(filter_type:, path_params:)
govuk_link_to "Clear", clear_filters_path(filter_type:, filter_path_params:)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Path_params kept on getting cleared, I think because of this: rails/rails#43770

Comment on lines +2 to +4
enum :log_type, { lettings: "lettings", sales: "sales" }
enum :rent_type_fix_status, { not_applied: "not_applied", applied: "applied", not_needed: "not_needed" }
enum :failure_reason, { blank_template: "blank_template", wrong_template: "wrong_template" }
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our current syntax is deprecated in Rails 8

@@ -7,7 +7,6 @@ def initialize(id, hsh, page)
@check_answers_card_number = 0
@max = 150
@min = 0
@hint_text = I18n.t("hints.offered")
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This question is a 2023 question, but the translation for this is missing. We now get an exception because of config.i18n.raise_on_missing_translations

@@ -13,7 +13,9 @@ class MergeRequest < ApplicationRecord
request_merged: "request_merged",
deleted: "deleted",
}.freeze
enum status: STATUS

attribute :status, :string
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Enums now have to be backed by either a db column or an attribute

@@ -0,0 +1,17 @@
en:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't know if this is the best place to put it, but as we raise all our missing translations, we have some that are only used in tests

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels like a sign we should maybe get rid of them...although actually these are coming from test form definitions, right? Probably not too bad, and can't really think of anywhere better for them to go.

Comment on lines +15 to +19
if LocalAuthority.count.zero?
la_path = "config/local_authorities_data/initial_local_authorities.csv"
service = Imports::LocalAuthoritiesService.new(path: la_path)
service.call
end
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

enums can't be empty {} so this fixes location/scheme tests

@kosiakkatrina kosiakkatrina marked this pull request as ready for review December 9, 2024 15:46
Copy link
Collaborator

@RachaelBooth RachaelBooth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - feels like we might want to do a fair amount of testing though looking at what's needed to change.

@@ -0,0 +1,17 @@
en:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels like a sign we should maybe get rid of them...although actually these are coming from test form definitions, right? Probably not too bad, and can't really think of anywhere better for them to go.

@kosiakkatrina kosiakkatrina added this pull request to the merge queue Dec 13, 2024
Merged via the queue into main with commit 8ffc5c6 Dec 13, 2024
15 checks passed
@kosiakkatrina kosiakkatrina deleted the update-rails-7.2.2 branch December 13, 2024 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants