Xavier N. wrote:
On Fri, Jun 13, 2008 at 1:33 AM, Richard S.
[email protected] wrote:
If you know how to pass multiple parameters to the controller using
text_field_with_auto_complete, then please let me know. Thanks!
The hash with autocompletion options accepts a standard Ajax :with
parameter. For example, you could send an entire form containing the
text field this way:
:skip_style => true, :with => “$(‘my-superb-form’).serialize()”
Right now i have
<% form_for :search, @search, :url => { :action => “search”}, :html =>
{:id => ‘my-superb-form’, :name => ‘my-superb-form’} do |f| %>
<%= f.text_field( :nonsense, :value => “double checking”) %>
<%= select_tag :language, options_for_select([“English”, “French”,
“Spanish”]) %>
<%= text_field_with_auto_complete :search, :contains, :size => 15,
:frequency => 0.1, :skip_style => true,
:with => “$(‘my-superb-form’).serialize()” -%>
<% f.submit ‘Search’ %>
<% end %>
when i check my log all i see is
Parameters: {“search”=>{“contains”=>“a”},
“authenticity_token”=>“bb42c98bf1b8a9497e1f08b5de88cf06c49dd38c”,
“controller”=>“phrases”, “action”=>“auto_complete_for_search_contains”}
I also tried using :with => “‘arbitrary_value=’+English” -%>
and get the same result, I am using rails 2.0.2 on mac osx 10.5. Thanks
for your help so far!!