Skip to content

Instantly share code, notes, and snippets.

@maletor
Created January 3, 2017 23:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maletor/68f818ad0bbb534004cf4a603ae637d3 to your computer and use it in GitHub Desktop.
Save maletor/68f818ad0bbb534004cf4a603ae637d3 to your computer and use it in GitHub Desktop.
Mysterious behavior of find_by
(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