As I understand it, Ajax allows you to only refresh the part of the page that you specify, as opposed to reloading the whole thing. Is there a way of doing this with a link_to method, for example, <%= link_to 'approve', approve_model_path(@model.id), method: :put %>
? I can't figure out how a link_to could be executed without the whole page being reloaded.
You can apply ajax by setting remote to true:
<%= link_to 'approve', approve_model_path(@model.id), method: :put, remote: true %>
This does a js request, then you need an approve.js.erb to do the few changes you need (without refreshing the page)