ms
2010-May-31 10:50 UTC
Multiple calls of validate() method in composed model by ActiveRecord, why?
Hi, thank you for reading my post. When I went trough my logs last time, I noticed that ActiveRecord calls the validate() method of one of my models multiple times. The concerned model acts like a linked list (no plug-in) and references itself. The validate() method is not only called twice, but three or four times depending on the position of the model instance in the list. What''s the reason for this and how can I get rid of this? Thank you very much in advance, ms -- 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.
Frederick Cheung
2010-May-31 15:42 UTC
Re: Multiple calls of validate() method in composed model by ActiveRecord, why?
On May 31, 11:50 am, ms <m...-cGBD8117FJM@public.gmane.org> wrote:> Hi, > > thank you for reading my post. When I went trough my logs last time, I > noticed that ActiveRecord calls the validate() method of one of my > models multiple times. The concerned model acts like a linked list (no > plug-in) and references itself. The validate() method is not only > called twice, but three or four times depending on the position of the > model instance in the list. > > What''s the reason for this and how can I get rid of this?What does your code look like? Fred> > Thank you very much in advance, > ms-- 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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.