Simplify subscribe path helper calls

This commit is contained in:
Anton Khorev 2024-07-16 17:32:00 +03:00
parent 4a62dac9c0
commit 1f4c298f76
2 changed files with 2 additions and 2 deletions

View file

@ -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 %>
</div>
<% end %>

View file

@ -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