Form GET / POST problem

I have a search form on page. It works fine, but if user give a search
word by typing it in URL:

After that search form dosn’t work any more, because form post data to
this URL and word in URL overwrite input-word in form.

What can I do to fix this?

In PHP a simple can:

if $_POST[‘word’]
$word = $_POST[‘word’]
$word = $_GET[‘word’]

But what I can do in Rails?

Help ???

Hi, where’s the relevant Rails source so that people can better assist
Also, what version of Rails are you using?

Rails is 2.1

The problem is that if “page” gets parameters from form (POST) and from
so GET parameter overwrtie POST.

Well one solution would be to use different names, Then u could do
@word = params[:word] || params[:word_post]