Fred, thanks:

Well - per your suggestion, I turned net tracking on in firebug (I'm
using firefox). And the problem went away... like Heisenberg said :-).

Sorry for bothering the list with such artifact.

It's a little scary to see the browser get in to such a state
though...

Y

On Nov 12, 5:48 pm, Frederick Cheung <[EMAIL PROTECTED]>
wrote:
> On Nov 13, 1:00 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
> > per the subject line, further investigation reveals that all the
> > methods in my controller that i am using, are called exactly twice
> > each time i expect them to be called once. i am confused...
>
> Anything interesting in your controller? Can you see (using tcpdump or
> whatever your platform has) whether the browser is actually making two
> requests ?
>
> Fred
>
>
>
>
>
> > On Nov 12, 3:07 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
> > > I'm uploading a file via the user's browser. The index method in my
> > > controller is:
>
> > >         <%= form_tag({:action=>'receive_file'}, :multipart => true)%>
> > >                 <input type="file" name="user_data_file" />
> > >                 <p></p>
> > >                 <input type="submit" value="Upload" />
> > >         </form>
>
> > > I get a form with a 'browse' button and an 'upload' button. I use the
> > > browse control to select a file and I press the 'upload' button.
>
> > > The method 'receive_file' in my controller gets called (with method
> > > GET) and executes, then passes control to the corresponding view so
> > > far so good.
>
> > > The strange thing is that behind the scenes, something immediately
> > > calls my 'receive_file' method a second time (this time with method
> > > POST).
>
> > > Why is this hapenning? How am I supposed to handle it? I don't want to
> > > execute my receive_file method twice.
>
> > > Thanks for your help,
> > > Yoram- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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