Update specific div using post request

It is possible to update specific div in my rhtml file using post
request like ajax do?

It is possible to update a specific div using a post request like AJAX
you need to use link_to_remote method for this.

What does this link_to_remote method does…

Returns a link to a remote action defined by options[:url] (using the
url_for format) that’s called in the background using XMLHttpRequest.
result of that request can then be inserted into a DOM object whose id
be specified with options[:update]. Usually, the result would be a
prepared by the controller with render :partial.
(from apis)

link_to_remote (“Delete”, :update=>“posts”, :url=> {:action =>“destroy”,

the above function call will generate a link called Delete which when
will delete the item specified by the id and simultaneously update the
having the id “posts” without reloading the page.

link_to_remote requests are posts so don’t need to worry about it.