<% if @journal_destroyed.nil? %> alert('<%=l(:notice_failed_delete)%>'); <% else %> var destroyedItem = $('#word_li_<%=@journal_destroyed.id%>') destroyedItem.fadeOut(600,function(){ destroyedItem.remove(); }); <% end %>