Sometimes we need to make post request to controller actions to do logic that we need to return back to the views. This can easily be handled with the help of jQuery and a little understanding of how rails handles request.
This may not be the best scenario for this to be applied, but I'm just giving grounds for this example.
Let's say for example we have this code:
<a href="#" id="save"> Save Changes </a>