Fix edit link being visible for active aliases/implications

They can't actually be edited unless they're pending
This commit is contained in:
Toks
2014-10-27 22:29:49 -04:00
parent be112b4191
commit 3035cd3c64
2 changed files with 2 additions and 2 deletions

View File

@@ -37,7 +37,7 @@
| <%= link_to "Edit", edit_tag_alias_path(tag_alias) %>
<% end %>
<% if tag_alias.deletable_by?(CurrentUser.user) %>
<% if tag_alias.is_pending? && tag_alias.editable_by?(CurrentUser.user) %>
| <%= link_to "Delete", tag_alias_path(tag_alias), :remote => true, :method => :delete, :data => {:confirm => "Are you sure you want to delete this alias?"} %>
<% end %>

View File

@@ -31,7 +31,7 @@
<td>
<%= link_to "Show", tag_implication_path(tag_implication) %>
<% if tag_implication.editable_by?(CurrentUser.user) %>
<% if tag_implication.is_pending? && tag_implication.editable_by?(CurrentUser.user) %>
| <%= link_to "Edit", edit_tag_implication_path(tag_implication) %>
<% end %>