Ruby on Rails Wednesday, April 29, 2015

Hi, I'm using a custom validation method to validate some logic.
But i realized that the database query is running two times.
So the database is being called twice.

The validation methos just display an error if array items are duplicated.

Log:

Prova Load (0.4ms)
["a", "a"]

Questao Load (0.4ms)
["a", "ab"]

What's wrong with my code ?

Thanks.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/78696445-84f0-4953-a966-70d2309dacf8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment