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