Created
January 3, 2017 23:03
-
-
Save maletor/68f818ad0bbb534004cf4a603ae637d3 to your computer and use it in GitHub Desktop.
Mysterious behavior of find_by
This file contains hidden or 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
(byebug) Survey::Token.find_by(token: params[:token], survey_id: @@survey) | |
nil | |
(byebug) Survey::Token.where(token: params[:token], survey_id: @@survey).take | |
#<Survey::Token id: 49078, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment