Skip to content

Instantly share code, notes, and snippets.

@moustafasamir
Created March 5, 2013 13:27
Show Gist options
  • Save moustafasamir/5090293 to your computer and use it in GitHub Desktop.
Save moustafasamir/5090293 to your computer and use it in GitHub Desktop.
Select nth element only(not all elements) sorted by a specific column
last_post = Post.limit(1).offset(2999).order("created_at desc")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment