[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Form posts twice - once as post and again as get. Help!

Bakki Kudva

2/21/2007 4:21:00 PM

Hi all,

I am posting this here #1 out of desperation and #2 on chance that this
might be an ERB issue and ofcourse most importantly because many rails
gurus hang out here :)

I am having a very strange problem. I have a search form with a bunch
of
fields for a db query of a table called people. The associated :person
model has_many sub models such as :addresses, :skills etc. The
Person.find uses :include to eager load the data from various other
tables which :belong_to people.

The results page contains a form built dynamically where the user can
select check boxes to the select persons from the result set and then
save the set.

The problem:
The search form is submitted and the query processed and the results
page
rendered. tail -f log shows..

First post:
Processing PersonSearchController#search (for 127.0.0.1 at 2007-02-20
13:49:28) [POST]
Parameters: {"person_search"=>{"city"=>"", "skill_id_3"=>"",
"skill_search"=>"1",...etc, etc

.....normal processing happens here till....
Rendered person_search/_results (0.00915)
Rendered layouts/_footer (0.00027)
Completed in 15.63002 (0 reqs/sec) | Rendering: 0.25152 (1%) | DB:
0.02095 (0%) | 200 OK [http://localhost/person_search/search]

The strange thing is that my breakpoint in the search action hits
again immediately. And I get a second post which actually is a get.

Processing PersonSearchController#search (for 127.0.0.1 at 2007-02-20
13:49:44) [GET]
Session ID: 30519ded2f3bfa275e4cb7a2c1e67edc
Parameters: {"action"=>"search", "controller"=>"person_search"}

There are no form params this time. This causes (500 Internal Error)

Relevant info:

Both the search form and the results page with the form have
auto_complete fields which work fine and actually use a dedicated
auto_completion_controller.


Has any one seen this behaviour? Any clues/pointers will be greatly
appreciated.

-bakki

--
Posted via http://www.ruby-....

2 Answers

The Peeler

2/24/2013 11:25:00 AM

0

On Sun, 24 Feb 2013 11:37:19 +0100, Dumb Heini, the heavily medicated Dutch
resident Nazi troll and laughing stock of sci and scj, wrote:

>> How's the snowstorm?
>
> Fuck off you piece of garbage!
>
> your kind is not invited to this group so go away

Dumb Heini, it looks more like YOU are and will never be invited ANYWHERE,
by ANYONE, not even by your wife and daughter who prefer to have a good time
WITHOUT you, as far away from you as possible!

--
Dumb Dutch Nazi Heini about his personal misery: "I FEEL LONELY AT THE
MOMENT, IT IS RAining again and the sky is grey so a perfect scenbario to
commit suicide"
Message-ID: <vegVo.11791$jj5.10722@newsfe03.iad>

The Revd

2/24/2013 1:31:00 PM

0

On Sun, 24 Feb 2013 02:30:24 -0800 (PST), Grikboxer?? The aborted Grik
piece of skata <tricia.brumant@gmail.com> wrote:

>On Sunday, February 24, 2013 7:49:10 AM UTC+2, The Revd wrote:
>> How's the snowstorm?
>
>Fuck off you piece of garbage!

Greek off, you aborted pro-semitic Grik piece of skata!