[openstreetmap/openstreetmap-website] Changeset subscription model (PR #5797)

Tom Hughes notifications at github.com
Thu Mar 13 19:23:15 UTC 2025


@tomhughes commented on this pull request.



> @@ -63,7 +63,7 @@ class User < ApplicationRecord
   has_many :preferences, :class_name => "UserPreference"
   has_many :changesets, -> { order(:created_at => :desc) }, :inverse_of => :user
   has_many :changeset_comments, :foreign_key => :author_id, :inverse_of => :author
-  has_and_belongs_to_many :changeset_subscriptions, :class_name => "Changeset", :join_table => "changesets_subscribers", :foreign_key => "subscriber_id"
+  has_many :changeset_subscriptions, :foreign_key => :subscriber_id

Technically this changes the association to return subscription records rather than changeset record - based on the name that is likely correct but presumably it means nothing is using it...

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5797#pullrequestreview-2683149858
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/5797/review/2683149858 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250313/6ea2503d/attachment.htm>


More information about the rails-dev mailing list