Hi All, I am trying to save my form data in to table. I am able to add the data successfully but it creates the 2 record for the single time of form submission. Let me explain in detail. My flow is like following: First the user fills the form. When it submits the form, create method will called and after completion of that it redirects to show page of created user. In browser it works just like I said. But, in back-end(in log), it creates one record than redirects to the show page, than once again it hits the create def and insert the same data in to table and again redirects to show page. I am using rails 2.3.5 and ruby 1.8.6 Any idea??? -- Posted via http://www.ruby-forum.com/. -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Smit Shah wrote:> Hi All, > > I am trying to save my form data in to table. I am able to add the data > successfully but it creates the 2 record for the single time of form > submission. > > Let me explain in detail. My flow is like following: > > First the user fills the form. When it submits the form, create method > will called and after completion of that it redirects to show page of > created user. > > In browser it works just like I said. But, in back-end(in log), it > creates one record than redirects to the show page, than once again it > hits the create def and insert the same data in to table and again > redirects to show page. > > I am using rails 2.3.5 and ruby 1.8.6 > > Any idea???Your create method is getting called twice. A look at code would help in resolving the issue. Anubhaw -- Posted via http://www.ruby-forum.com/. -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.