From: Anton Khorev Date: Tue, 16 Jul 2024 14:32:00 +0000 (+0300) Subject: Simplify subscribe path helper calls X-Git-Tag: live~432^2~1 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/1f4c298f764cce10c6875fbdce02fe853fa4e635 Simplify subscribe path helper calls --- diff --git a/app/views/diary_entries/show.html.erb b/app/views/diary_entries/show.html.erb index cfed1c46d..e80a44f09 100644 --- a/app/views/diary_entries/show.html.erb +++ b/app/views/diary_entries/show.html.erb @@ -21,7 +21,7 @@ <% if @entry.subscribers.exists?(current_user.id) %> <%= link_to t(".unsubscribe"), diary_entry_unsubscribe_path(@entry.user, @entry), :method => :post, :class => "btn btn-sm btn-primary" %> <% else %> - <%= link_to t(".subscribe"), diary_entry_subscribe_path(@entry.user, @entry.id), :method => :post, :class => "btn btn-sm btn-primary" %> + <%= link_to t(".subscribe"), diary_entry_subscribe_path(@entry.user, @entry), :method => :post, :class => "btn btn-sm btn-primary" %> <% end %> <% end %> diff --git a/test/controllers/api/changesets_controller_test.rb b/test/controllers/api/changesets_controller_test.rb index 17a9ad9d3..8bb229294 100644 --- a/test/controllers/api/changesets_controller_test.rb +++ b/test/controllers/api/changesets_controller_test.rb @@ -2592,7 +2592,7 @@ module Api # bad changeset id assert_no_difference "changeset.subscribers.count" do - post api_changeset_subscribe_path(:id => 999111), :headers => auth_header + post api_changeset_subscribe_path(999111), :headers => auth_header end assert_response :not_found