Hi you can try this:
application.html.erb:
<%= javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js", "jquery.rails.js" %>
and your link code should be like this:
<%= link_to "<i class='icon-trash'></i> Delete".html_safe, item, :confirm => "Are you sure you want to delete item: " + item.name + "?" ,:method => :delete%>
and your controller should have like this:
def destroy
@item = Item.find(params[:id])
if @item.destroy
redirect_to items_path, :notice => "Successfully deleted an item."
else
redirect_to items_path, :notice => "Failed to delete an item."
end
end