I am rendering data in a page and when i want to edit the data im using a twitter bootstrap modal and rendering a form, everything goes Ok but when i click in the submit button the page refresh completely. So i want when i click in the submit button the modal close and just refresh the data im rendering. Any ideas?
Share
You need ajax for that. Typically you append
:remote => trueto your formTo this effect:
<%= form_for(@post, :remote => true) do |f| %>
…
<% end %>
Please take a look at the API for FormHelper.