On 6 March 2010 18:50, Ralph Shnelvar <[email protected]> wrote:
> Consider the following:
>
> - - -
> <% form_for @countryToSearchFor, :url => signed_in_path(:action =>
> "show",
>        :id => 'connected_to_country', :something => 'other'),
>        :html => {:method => :get} do |f| %>
>
>  <%= f.select :country, language_neutral_array_of_countries,
>        :prompt => 'enter_country' %>
>  <div>
>    <%= f.submit shnI18n.literal('search_for_connection') %>
>  </div>
> <% end %>
> - - -
>
> The debugger tells me that
>  signed_in_path(:action => "show",
>    :id => 'connected_to_country', :something => 'other')
>  # ==>  "/signed_in/connected_to_country?locale=en&amp;something=other"
>
> When the user submits the form both the parameters (locale and
> something) have disappeared.  This causes more than a small bit of
> havoc.

I think maybe you cannot include query terms in form_for :url.  An
alternative is to use hidden fields in the form.

Colin

-- 
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.

Reply via email to