On 28 Dec 2008, at 13:34, Zhao Yi wrote:
> > zero0x wrote: >> Check source code and find <select name="xxx"> >> >> The xxx value is what you can access with params[:xxx] >> >> -- >> >> Good advice: Download Firebug plugin for Firefox, which shows all the >> communication between page and server, and you'll see all the POST >> variables with the values :) >> >> On 28. Dec., 14:08 h., Zhao Yi <[email protected]> > > In this case: > > select_tag: project_selection,options_for_select(@project_names), > :onchange > =>remote_function(:update=>'posts',:loading=>'false', :url => > { :action => :update_project_selection }) > > the name should be "project_selection", but in its controller I print > the params keys: > You have to tell remote function what to submit, it's not going to guess for you. This is what the :with option for remote_function is for. Check the docs for link_to_remote for some examples, I've got some extra ones at http://www.spacevatican.org/2008/5/17/with-or-without-you-link_to_remote-s-mysterious-parameter too Fred > params.keys.each{|k|puts k} > > there is not such key named "project_selection". > -- > 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

