Displaying 1 result from an estimated 1 matches for "script_new".
2012 Feb 07
2
save method (create action) saves twice
Rails 3.1.3
I have changed a regular scaffold action a bit so that it can save using
ajax.
All I needed to do was adding ":remote => true" in
<div id="script_new">
<%= form_for script, :remote => true do |f| %> <!-- HERE!!! -->
<%= f.hidden_field :video_id %>
<%= f.text_field :text %>
<%= f.submit "save" %>
<% end %>
</div>
then even though the whole page does not change itself, I...