Browse files

Add documentation for ActiveRecord::QueryMethods#offset [ci skip]

  • Loading branch information...
1 parent 8a8aa67 commit a28eda16d34e2b85c5f0afeaa3a40410043a0605 @ulisescab ulisescab committed Jun 16, 2012
Showing with 7 additions and 0 deletions.
  1. +7 −0 activerecord/lib/active_record/relation/query_methods.rb
View
7 activerecord/lib/active_record/relation/query_methods.rb
@@ -229,6 +229,13 @@ def limit!(value)
self
end
+ # Specifies the number of rows to skip before returning rows.
+ #
+ # User.offset(10) # generated SQL has "OFFSET 10"
+ #
+ # Should be used with order.
+ #
+ # User.offset(10).order("name ASC")
def offset(value)
spawn.offset!(value)
end

0 comments on commit a28eda1

Please sign in to comment.