Hello, is there any way to pass additional parameters (e.g. a string) from the text_field_with_auto_complete to the controller? Indra -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
You can use the :url option. The symbols you set after :action will be appended to the querystring. <%= text_field_with_auto_complete :my_field, "Enter some text", {:url =>{:action => ''auto_complete_action_name'', :my_param => "hello"}, :method => :get} %> best. mike On Jun 4, 2008, at 7:53 AM, Indra M. wrote:> > Hello, > > is there any way to pass additional parameters (e.g. a string) from > the > text_field_with_auto_complete to the controller? > > Indra > -- > Posted via http://www.ruby-forum.com/. > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thank you! That''s exactly what I was looking for. Indra -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
this didn''t work for me <%= text_field_with_auto_complete :search, :contains, {:url => {:action => "auto_complete_for_search_contains", :language => "English" }, :method => :get} %> produced Parameters: {"search"=>{"contains"=>"a"}, "authenticity_token"=>"2c9f26a81557318a3d7ce1ff64bc57bea43c5fdc", "controller"=>"phrases", "action"=>"auto_complete_for_search_contains"} i tried pretty much every combination of :url :html and curley braces that is humanly possible and nothing seemed to work, any suggestions? Rails 2.0.2 running script/plugin install http://svn.rubyonrails.org/rails/plugins/auto_complete On Jun 4, 8:34 am, "Indra M." <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Thank you! > That''s exactly what I was looking for. > > Indra > > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---