Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
<%= form_tag(add_category_service_path(@service), :method => 'post', :remote => true) do %>
<%= select_tag 'service-category', options_for_select(['test'] %>
<%= submit_tag "Submit", :id => 'submit' %>
<% end %>
# controller
def add_category
respond_to do |format|
format.js {
render :text => 'fu'
# route
add_category_service POST /services/:id/add_category(.:format) {:action=>"add_category", :controller=>"services"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment