I think..
REPLACE
unless params[:location][:id].blank?
#set location

WITH
unless params[:location].blank?
#set location

Remember, the location id that the user will submit IF he uses the form will
still be in params[:location][:id]. So if you're doing a find in there using
the ID then you can access it by using params[:location][:id].

A better check would be to check the commit message that gets passed when
the user submits the form. In this case, if your form submit button says
"Go", then

unless params[:commit] == "Go"
#set location

On Tue, May 12, 2009 at 12:07 AM, bingo bob <
rails-mailing-l...@andreas-s.net> wrote:

>
> Ah. Maybe this is the problem.
>
> The form is on the index page.
> The form is not submitted when the user goes to this index page.
>
> The form is only submitted when they click the go button.
>
> How do I handle that?
>
> Vinay Seshadri wrote:
> > Now because the parameters are empty, the form really isnt working. do
> > take
> > a look at the API. Implement form_tag or form_for for your needs and
> > make it
> > work. Check if you've got the parameters. And go from there...
>
> --
> Posted via http://www.ruby-forum.com/.
>
> >
>


-- 
In Sport We Trust !!!

--~--~---------~--~----~------------~-------~--~----~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to