fixed pool deletion logic

This commit is contained in:
albert
2012-03-15 18:26:39 -04:00
parent 1736ed17a9
commit 779d83e253
7 changed files with 48 additions and 8 deletions

View File

@@ -9,7 +9,11 @@
<li><%= link_to "Posts", posts_path(:tags => "pool:#{@pool.id}") %></li>
<li><%= link_to "Edit", edit_pool_path(@pool) %></li>
<% if @pool.deletable_by?(CurrentUser.user) %>
<li><%= link_to "Delete", pool_path(@pool), :method => :delete, :confirm => "Are you sure you want to delete this pool?", :remote => true %></li>
<% if @pool.is_deleted? %>
<li><%= link_to "Undelete", undelete_pool_path(@pool), :method => :post, :remote => true %></li>
<% else %>
<li><%= link_to "Delete", pool_path(@pool), :method => :delete, :confirm => "Are you sure you want to delete this pool?", :remote => true %></li>
<% end %>
<% end %>
<li><%= link_to "Order", edit_pool_order_path(@pool) %></li>
<% end %>