Skip to content

Instantly share code, notes, and snippets.

@roychri
Created October 3, 2012 13:26
Show Gist options
  • Save roychri/3826893 to your computer and use it in GitHub Desktop.
Save roychri/3826893 to your computer and use it in GitHub Desktop.
How to add activerecord query calls to existing
def a
e = Event.order("id DESC")
e = e.offset(3)
e = e.limit(1)
e
end
a.count
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment