otwarchive-symphonyarchive/app/views/subscriptions/_form.html.erb

15 lines
476 B
Text
Raw Normal View History

2026-03-11 22:22:11 +00:00
<% # expects subscription and current_user %>
<%= form_for([current_user, subscription],
method: subscription.new_record? ? 'post' : 'delete',
html: {
class: 'ajax-create-destroy',
data: {
create_value: ts('Subscribe'),
destroy_value: ts('Unsubscribe')
}
}) do |f| %>
<%= f.hidden_field :subscribable_id %>
<%= f.hidden_field :subscribable_type %>
<%= f.submit subscription.new_record? ? ts('Subscribe') : ts('Unsubscribe') %>
<% end %>