Skip to content

Instantly share code, notes, and snippets.

@marshall-lee
Created September 25, 2018 16:27
Show Gist options
  • Save marshall-lee/eec304bc0ae42ccfd81a6a3a2675e4f4 to your computer and use it in GitHub Desktop.
Save marshall-lee/eec304bc0ae42ccfd81a6a3a2675e4f4 to your computer and use it in GitHub Desktop.
[17] pry(main)> puts Post.all.select(1).to_sql
SELECT 1 FROM "posts"
=> nil
[18] pry(main)> puts Post.all.select(1).limit(1).to_sql
SELECT  1 FROM "posts" LIMIT 1

Why put two space after SELECT?

Solution: rails/rails#33977

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment