[openstreetmap/openstreetmap-website] List of user's changeset comments (PR #4248)

Andy Allan notifications at github.com
Thu Sep 14 17:02:30 UTC 2023


@gravitystorm commented on this pull request.



>    resources :notes, :path => "note", :only => [:show, :new]
 
   get "/user/:display_name/history" => "changesets#index"
   get "/user/:display_name/history/feed" => "changesets#feed", :defaults => { :format => :atom }
+  get "/user/:display_name/history/comments" => "changeset_comments#index", :as => :history_comments

We should try to avoid the `:as` setting entirely. As we move to more resourceful routing, it becomes less and less necessary. Generally we want to use resourceful routing, and accept the auto generated route names as-is.

I need to think about the controller structure for this PR. I know that (ignoring the API) we've currently got a flat hierarchy of controllers, but this approach has disadvantages. For example, it's not clear that `app/controllers/changeset_comments_controller.rb#index` would be a user-scoped subset of changeset comments, and it would clash with any implementation of site-wide changeset_comments#index (e.g. for moderation). I want to consider the pros and cons of having a `user/changeset_comments` controller but I need to play around with that.

In any case, I would ask for resourceful routing here.

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

Message ID: <openstreetmap/openstreetmap-website/pull/4248/review/1627386539 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20230914/1c15bd8e/attachment.htm>


More information about the rails-dev mailing list