[AIBUR] Add a "flip" button to aliases and implications

This commit is contained in:
Tarrgon 2024-08-18 13:57:10 -04:00 committed by GitHub
parent ba9e600950
commit b23303e1b2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -13,6 +13,7 @@
<% end %>
<% if tag_relation.editable_by?(CurrentUser.user) %>
<% links.push link_to("Edit", action: "edit", controller: "/#{tag_relation.model_name.route_key}", id: tag_relation.id) %>
<% links.push link_to("Flip", send("#{tag_relation.model_name.route_key.singularize}_path", id: tag_relation.id, "#{tag_relation.model_name.route_key.singularize}": { antecedent_name: tag_relation.consequent_name, consequent_name: tag_relation.antecedent_name }), method: :patch) %>
<% end %>
<%= safe_join(links, " | ") %>
</span>