ruby on rails - Javascript Form Submition -
i'm looking refresh the table "dashboard_categories" when click submit without whole page refreshing, i've done far: http://pastie.org/7822560
i'm stuck on javascript i'm complete novice. know have catch form submission, send data , call partial refresh... have no clue how. ideas?
hopefully i'm not far off...
i've got content_for tag javascript on index.html.erb:
<% content_for :javascript %> <script type='text/javascript'> </script> <% end %>
include unobtrusive javascript driver in manifest app/assets/javascript/application.js
:
//= require jquery_ujs
and mark form submitted ajax:
<%= form_for(@category), remote: true |f| %>
Comments
Post a Comment