pretty sure that its not ruby on rails problem. its maybe because of
your javascript or maybe try to read your codes again

On Jan 6, 3:00 pm, Brynjolfur Thorvardsson <[email protected]> wrote:
> Hi, this sounds like a javascript problem. Javascript is executed 
> asynchroniously on your browser so clicking fast means that you are sending 
> more than one submit from the same form, causing Rails to return more than 
> once from the controller. There are probably many ways to avoid this but one 
> is to put in a delay of say half a second in your javascript submit code.
>
> Fra: [email protected] 
> [mailto:[email protected]] På vegne af Javier Quarite
> Sendt: 5. januar 2012 17:55
> Til: [email protected]
> Emne: Re: [Rails] Duplicate forms after click
>
> On Thu, Jan 5, 2012 at 11:44 AM, Colin Law 
> <[email protected]<mailto:[email protected]>> wrote:
>
> Look in the rails log to see what is happening (development.log
> assuming in development mode).
> Once you understand what is happening you will be better placed to fix it.
>
> Colin
>
> Yes, I've done that and every time I click on that radio... it makes an 
> update and it saves the chosen option, if I make 2 fast clicks (or N clicks) 
> it renders 2 (or N ) partials.
>
> In my log after doing the update in database, it renders the partial and 
> after that it calls the update.js that I use, is there a way to avoid this 
> behavior? or it something related to the javascript?
>
> Thanks
>
> Javier
> --
> 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]<mailto:[email protected]> .
> To unsubscribe from this group, send email to 
> [email protected]<mailto:rubyonrails-talk+unsub 
> [email protected]>.
> For more options, visit this group 
> athttp://groups.google.com/group/rubyonrails-talk?hl=en.

-- 
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