[openstreetmap/openstreetmap-website] Microcosms microcosms (PR #3683)
Brian DeRocher
notifications at github.com
Sat Sep 17 20:02:52 UTC 2022
@openbrian commented on this pull request.
> @@ -323,6 +323,11 @@
# redactions
resources :redactions
+ # microcosms
+ get "/microcosms/of_user/:display_name" => "microcosms#of_user", :as => :microcosms_of_user
Right, in this stage, there are no members yet. So the relationship between users and microcosms is that, the user is the owner of the microcosm. Once we have proper membership, we'll have multiple organizers of a microcosm and general membership in a microcosm. I feel /user/Joe/microcosms would list both groups organized and groups Joe belongs to. That's the design pattern I see on other websites out there. I'm not opposed to creating a separate route for organizers and members.
Yeah, I feel this of_user action is in the wrong place. The microcosm links was a clear cut case. But the users stuff -- as with diary entries, traces, and notes -- is different due to the many-to-many relationships. The index action for notes, traces, and diary entries takes an optional :display_user. I'll get microcosms working that way. But in routes.rb, they all do it like this.
```
get "/user/:display_name/notes" => "notes#index", :as => :user_notes
get "/user/:display_name/traces" => "traces#index"
get "/user/:display_name/diary" => "diary_entries#index"
```
Seems like all of these could be nested resources.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/3683#discussion_r973622974
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/3683/review/1111466363 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20220917/2c1e2749/attachment.htm>
More information about the rails-dev
mailing list