[openstreetmap/openstreetmap-website] Messages controller method renaming for show and destroy (#1863)

Andy Allan notifications at github.com
Tue May 15 10:45:57 UTC 2018


This PR renames the old #read and #delete methods of the messages controller methods, to #show and #destroy respectively. This brings them into line with rails standard naming conventions, laying some groundwork for future resourceful routing.

@Nikerabbit this PR contains some more translation key renaming, namely:

* `messages.read.*` becomes `messages.show.*`
* `messages.show.delete_button` then becomes `messages.show.destroy_button`
* `messages.sent_message_summary.delete_button` becomes `messages.sent_message_summary.destroy_button`
* `messages.message_summary.delete_button` becomes `messages.message_summary.destroy_button`
* `messages.delete.deleted` becomes `messages.destroy.destroyed`
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Remove unused POST method for message replies
  * Rename messages#delete to destroy
  * Rename messages#read to #show
  * Ensure database is writable before destroying a message

-- File Changes --

    M app/controllers/messages_controller.rb (12)
    M app/models/notifier.rb (2)
    M app/views/messages/_message_summary.html.erb (4)
    M app/views/messages/_sent_message_summary.html.erb (4)
    R app/views/messages/destroy.js.erb (0)
    R app/views/messages/show.html.erb (2)
    M config/locales/en.yml (12)
    M config/routes.rb (6)
    M test/controllers/messages_controller_test.rb (62)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/1863.patch
https://github.com/openstreetmap/openstreetmap-website/pull/1863.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/1863
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20180515/3b1bc83e/attachment.html>


More information about the rails-dev mailing list