[openstreetmap/openstreetmap-website] Users controller refactoring for password resets and confirmations (#3165)
Andy Allan
notifications at github.com
Wed Apr 7 15:14:12 UTC 2021
This PR continues on from #3147 by creating a PasswordsController (for password resets) and a ConfirmationsController.
Both these controllers could do with significant further refactoring, specifically to refactor to a resources approach (new, show, update, etc) instead of custom method names. This will also involve de-tangling the methods which currently take multiple http methods (GET, PUT) to do different things, which is a recurring source of complexity. But I've left that alone for now.
As before, the controller names are designed to align with Devise.
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/openstreetmap-website/pull/3165
-- Commit Summary --
* Split password reset functionality into PasswordsController
* Move confirmation methods into ConfirmationsController
-- File Changes --
M app/abilities/ability.rb (4)
M app/controllers/concerns/session_methods.rb (2)
A app/controllers/confirmations_controller.rb (137)
A app/controllers/passwords_controller.rb (67)
M app/controllers/users_controller.rb (181)
M app/mailers/user_mailer.rb (6)
R app/views/confirmations/confirm.html.erb (0)
R app/views/confirmations/confirm_email.html.erb (0)
R app/views/passwords/lost_password.html.erb (0)
R app/views/passwords/reset_password.html.erb (0)
M app/views/sessions/new.html.erb (2)
M config/locales/en.yml (74)
M config/routes.rb (12)
A test/controllers/confirmations_controller_test.rb (339)
A test/controllers/passwords_controller_test.rb (153)
M test/controllers/users_controller_test.rb (480)
M test/integration/user_creation_test.rb (42)
-- Patch Links --
https://github.com/openstreetmap/openstreetmap-website/pull/3165.patch
https://github.com/openstreetmap/openstreetmap-website/pull/3165.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/3165
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20210407/f9080525/attachment.htm>
More information about the rails-dev
mailing list