This is a vast subject, but for an ajax delete button you can start like this. In your table view, use :
<tr id="tr_<%= item.id %>">
...
<%= link_to 'delete', item, method: :delete, remote: true %>
</tr>
You must handle the ajax call on destroy route in your items_controller.rb
:
def destroy
@item= Item.destroy(params[:id])
respond_to do |format|
format.html { redirect_to items_url }
format.js
end
end
Create a new destroy.js.erb
file in your items views folder and put in it :
$('#your_table').remove('#tr_<%= @item.id %>');
Then when you click on the remove button, it will call the destroy action in your controller. As the button is defined as remote, rails will automagically perform an ajax request and won't reload the page. Your controller will render the according js view in which you then remove the row from your table.
As I said, this is only the beginning and it can be done much better on the javascript side. Also note that I didn't check the code.
Also have a look at http://railscasts.com/episodes/136-jquery-ajax-revised?view=asciicast for a more in depth explanation.