The `hide` action was calling the `block` method while the `soft_block` action was calling the `hide` method. Combined with the fact that we also have a `block` permission which is used in `ModerateActions` the logic was hard to follow.
13 lines
490 B
Plaintext
13 lines
490 B
Plaintext
<span class="moderation-actions">
|
|
<% if can? :hide, record %>
|
|
<%= link_to t("admin.actions.hide").capitalize, hide_path,
|
|
method: :put, remote: true, data: { confirm: confirm_hide_text } %>
|
|
<% end %>
|
|
|
|
<% if can? :hide, record.author %>
|
|
<%= raw separator %>
|
|
<%= link_to t("admin.actions.block_author").capitalize, block_moderation_user_path(record.author_id),
|
|
method: :put, data: { confirm: confirm_block_author_text } %>
|
|
<% end %>
|
|
</span>
|