I have this form:
<%= form_for(@post) do |f| %>
<%=f.collection_select :post_id, Board.where(:user_id => current_user.id), :id, :name %>
<%= f.submit "Post it"%>
<% end %>
I want to know how add new option without reload page with input button through jquery:
I want add the option to collection_select before submit form
I'm using jquery ujs https://github.com/rails/jquery-ujs
Example: