Skip to content

Instantly share code, notes, and snippets.

@davetapley
Created March 25, 2014 23:14
Show Gist options
  • Save davetapley/9773515 to your computer and use it in GitHub Desktop.
Save davetapley/9773515 to your computer and use it in GitHub Desktop.
[4] pry(main)> User.all.second
User Load (42.5ms) SELECT "users".* FROM "users" WHERE "users"."deleted_at" IS NULL
=> #<User id: 2, ...>
[5] pry(main)> User.all.offset(1).limit(1)
User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."deleted_at" IS NULL LIMIT 1 OFFSET 1
=> [#<User id: 2, ...]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment