Pass selected option to remote_function with Ruby on Rails
- by mathee
I have a list of options generated by the following Haml code.
%select#tags{:onchange => remote_function(:url => {:action => :display_tag_cart}, :with => 'Form.Element.serialize(this)'), :prompt => 'Choose a Tag'}
%option{:value=>""}
Choose a Tag
-Tag::TAGS.each do |t|
%option{:value=>t.id}
=h t.name
Form.Element.serialize(this) does not work.
How do I pass the value of the selection to display_tag_cart?