Last active
November 5, 2015 10:57
-
-
Save ArturLyapin/30bec90f2a487b43fdb0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#№1 Делает 2 select запроса по индексам. Должен работать быстрее | |
@campaign.participant_data_items.find_by(:name => "email", :value => "email@email.com").try(:participant) | |
#№2 Делает один тяжеловесный запрос | |
@store.participants.with_info_email("email@email.com", @campaign.id) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment