[openstreetmap/openstreetmap-website] Use resourceful routes for terms view/accept/decline (PR #5462)
Anton Khorev
notifications at github.com
Sat Jan 4 11:37:08 UTC 2025
- make user terms a nested resource inside the account resource
- `GET /user/terms` changed to `GET /account/terms`. It's inconvenient to have it at `/user/terms` because that depends on the declaration order. If user resources are declared first, they capture `terms` as a username. I still add a redirect from `/user/terms` to `/account/terms` which has to come before `resources :users`, but with redirects it's obvious that they are temporary.
- `POST /user/save` changed to `PUT /account/terms`. With `user#save` it's not clear that this is a target of the terms form.
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/openstreetmap-website/pull/5462
-- Commit Summary --
* Remove slashes from body css classes
* Use resourceful routes for terms view/accept/decline
-- File Changes --
M app/abilities/ability.rb (3)
M app/assets/stylesheets/common.scss (2)
A app/controllers/accounts/terms_controller.rb (65)
M app/controllers/application_controller.rb (6)
M app/controllers/concerns/session_methods.rb (2)
M app/controllers/users_controller.rb (52)
M app/helpers/application_helper.rb (3)
M app/views/accounts/edit.html.erb (2)
R app/views/accounts/terms/_terms.html.erb (0)
R app/views/accounts/terms/_terms_declined_flash.html.erb (0)
R app/views/accounts/terms/show.html.erb (2)
M config/locales/en.yml (57)
M config/routes.rb (8)
A test/controllers/accounts/terms_controller_test.rb (91)
M test/controllers/users_controller_test.rb (75)
M test/integration/user_terms_seen_test.rb (10)
-- Patch Links --
https://github.com/openstreetmap/openstreetmap-website/pull/5462.patch
https://github.com/openstreetmap/openstreetmap-website/pull/5462.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5462
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5462 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250104/64e879c1/attachment-0001.htm>
More information about the rails-dev
mailing list