-
Notifications
You must be signed in to change notification settings - Fork 3
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
Rails 7.2.2 #1929
Rails 7.2.2 #1929
Conversation
It looks like we have a very old version of activerecord-postgis-adapter: 3.1.2 when the current is 9.0.2. I'm not sure why we have that version, which is older than BOPS itself, but I think this is the cause of the "uninitialised constant" errors. However, the latest version (9.0.2) only supports Rails 7.1, so we'll need to wait for them to release a new version before we can update to Rails 7.2. |
Yes I am aware of that, there's an open issue on the activerecord-postgis-adapter gem. Last month they merged a PR but it looks like is still not fully supported. So it will need to wait |
Yep, just found the same; it looks like we could depend on the github version: gem "activerecord-postgis-adapter", github: "rgeo/activerecord-postgis-adapter" But I suggest waiting for an actual release unless we consider this upgrade urgent. |
6e64a79
to
a3adab1
Compare
e9ebac8
to
d22195a
Compare
app/models/neighbour.rb
Outdated
@@ -7,7 +7,7 @@ class AddressValidationError < StandardError; end | |||
has_many :neighbour_letters, dependent: :destroy | |||
has_many :neighbour_responses, dependent: :destroy | |||
|
|||
enum source: {manual_add: "manual_add", map_selection: "map_selection", sent_comment: "sent_comment"} | |||
enum :source, {manual_add: "manual_add", map_selection: "map_selection", sent_comment: "sent_comment"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can avoid the duplication here by doing this:
enum :source, %w[manual_add map_selection sent_comment].index_by(&:itself)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's useful to know, there were a few cases like this I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, this is better:
enum :source, %i[manual_add map_selection sent_comment].index_with(&:to_s)
That gives symbol keys and string values.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Naturally we have one enum where the keys use snake case and the values use kebab case, and another where the keys are lowercase and the values uppercase. I'm not sure those are worth trying to deduplicate.
13b3190
to
aaa5db9
Compare
aaa5db9
to
f0c1cf3
Compare
Description of change
Rails 7.2.1
Story Link
https://trello.com/c/ZAd8mStM