[openstreetmap/openstreetmap-website] Diary refactoring (#2238)

Andy Allan notifications at github.com
Wed May 29 14:21:37 UTC 2019


This PR contains some refactoring of diary entries, to use `:create` and `:update` methods separate from the `:new` and `:edit` methods. The routes are also partially refactored to use resources, and various path names are therefore adjusted.

@Nikerabbit this PR contains some i18n key renames:

* diary_entries.new.publish_button -> helpers.submit.diary_entry.create
* diary_entries.edit.subject -> diary_entries.form.subject
* diary_entries.edit.body -> diary_entries.form.body
* diary_entries.edit.language -> diary_entries.form.language
* diary_entries.edit.location -> diary_entries.form.location
* diary_entries.edit.latitude -> diary_entries.form.latitude
* diary_entries.edit.longitude -> diary_entries.form.longitude
* diary_entries.edit.use_map_link -> diary_entries.form.use_map_link
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Refactor diary entries to use create and update methods
  * Refactor some diary entry routes to use resources
  * Refactor diary entry form

-- File Changes --

    M app/abilities/ability.rb (2)
    M app/controllers/diary_entries_controller.rb (62)
    A app/views/diary_entries/_form.html.erb (35)
    M app/views/diary_entries/edit.html.erb (42)
    M app/views/diary_entries/index.html.erb (4)
    A app/views/diary_entries/new.html.erb (13)
    M app/views/layouts/_header.html.erb (4)
    M app/views/site/about.html.erb (2)
    M app/views/users/show.html.erb (4)
    M config/locales/en.yml (24)
    M config/routes.rb (15)
    M test/controllers/diary_entries_controller_test.rb (48)
    M test/controllers/users_controller_test.rb (14)
    M test/integration/user_diaries_test.rb (4)
    M test/system/diary_entry_test.rb (2)

-- Patch Links --

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


More information about the rails-dev mailing list