@ -27,4 +27,10 @@ module AsciicastsHelper
snapshot: asciicast.snapshot
}
end
def link_to_delete_asciicast(name, asciicast)
link_to name, asciicast_path(asciicast),
:method => :delete, :confirm => 'Really delete this asciicast?'
@ -30,8 +30,7 @@
</li>
<li>
<%= link_to 'Delete', asciicast_path(@asciicast),
<%= link_to_delete_asciicast 'Delete', @asciicast %>
:method => :delete, :confirm => 'Really delete this asciicast?' %>
</ul>
<% end %>