Skip to content

Commit

Permalink
Add documentation for ActiveRecord::QueryMethods#offset [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
ulisescab committed Jun 16, 2012
1 parent 8a8aa67 commit a28eda1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions activerecord/lib/active_record/relation/query_methods.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -229,6 +229,13 @@ def limit!(value)
self self
end 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) def offset(value)
spawn.offset!(value) spawn.offset!(value)
end end
Expand Down

0 comments on commit a28eda1

Please sign in to comment.