Ruby on Rails Wednesday, April 29, 2015

It may help if you showed us this code of which you speak.

On Wednesday, April 29, 2015 at 10:52:06 AM UTC-4, Gm wrote:
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 method just display an error if array items are duplicated.

Log:

Questao 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/9446a7f2-9c51-48ee-b322-44769a99f190%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment