Action being called multiple times from weak connection?


I have an action in a controller that sends a quote to a customer. The
quote is sent after we determine the price for the service.

Until recently, we did this internally and everything was fine except
one time. When it happened, I thought it was a fluke and ignored it.
Recently, I added a remote employee that is performing this task. He
has an internet connection that goes up and down (weak wireless signal).
Now the problem started happening regularly. It has forced me to put
what I consider a “hack” in my application.

Basically, an action is being called (email quote) and it SHOULD send a
quote to a customer, create an activity and update a status on the lead.
What I see happening is part (possibly all) of the action is being
executed multiple times (as many as 65). This is a huge problem because
suddenly I send a customer a quote 65 times!!! The hack I put in place
was to look at the last modified timestamp on the record and see if it
was modified within the last 15 seconds - if so, ignore the rest of the
code because I know this isn’t a “normal” situation. This is horrible,
but it saves me from sending out multiple emails.

Anyone else knowingly have this situation occur? How do you handle it?
I don’t think this is rails related, but am at a loss on how to solve it
without doing something like I described above.

Any input is appreciated.