[openstreetmap/openstreetmap-website] Rename User#delete to User#destroy (PR #3403)

Andy Allan notifications at github.com
Wed Dec 22 14:55:40 UTC 2021


"delete" is generally used for immediate SQL deletion without running any callbacks or other ruby code, whereas "destroy" will trigger callbacks.

Although we don't currently use any callbacks, let's rename this method to align better with the convention.
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/3403

-- Commit Summary --

  * Rename User#delete to User#destroy

-- File Changes --

    M app/controllers/users_controller.rb (4)
    M app/models/user.rb (4)
    M test/controllers/browse_controller_test.rb (2)
    M test/models/user_test.rb (4)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/3403.patch
https://github.com/openstreetmap/openstreetmap-website/pull/3403.diff

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

Message ID: <openstreetmap/openstreetmap-website/pull/3403 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20211222/df03fe03/attachment.htm>


More information about the rails-dev mailing list