ruby on rails jquery submit a form as js

前端 未结 3 1334
旧时难觅i
旧时难觅i 2021-01-03 07:38

I have this code in my view:

<%= form_for :folder_name, :remote => true, :method => \"get\", :url => {:action 
    => \"show_workflow_list\"}          


        
3条回答
  •  心在旅途
    2021-01-03 07:53

    try this

    <%= f.select :foldernames, options_for_select(@folders, @folders.first), {}, {:onchange => remote_function(:method => :get, :url => {:action => 'show_workflow_list'}, :with => 'Form.Element.serialize(this)')}%>

提交回复
热议问题