Skip to content

Instantly share code, notes, and snippets.

@unok
Created April 11, 2015 12:18
Show Gist options
  • Save unok/ff8b4d6a3af7084a4b04 to your computer and use it in GitHub Desktop.
Save unok/ff8b4d6a3af7084a4b04 to your computer and use it in GitHub Desktop.
# first が nil の場合 id が method が見つからないエラーになる
User.where(age: 20).first.id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment