I have this code in my view:
<%= form_for :folder_name, :remote => true, :method => \"get\", :url => {:action
=> \"show_workflow_list\"}
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)')}%><br /><br />
It is because you are using the jQuery submit call incorrectly
Check this article...it worked for me Rails remote form submit through javascript
On a JS file you should do this :
$('#foldernames').change(function() {
$('#folder_name').submit()
});
And in your controller you should have this :
def show_workflow_list
//code here
render :format => :js
end
When you change the value, it should submit your form so it should send an ajax request to your controller. Your controller should render a js format and execute your show_workflow_list.js.erb
. To check it, you can use a javascript console like firebug.