Method: ActiveRecord::QueryMethods#offset
- Defined in:
- activerecord/lib/active_record/relation/query_methods.rb
#offset(value) ⇒ Object
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")
1227 1228 1229 |
# File 'activerecord/lib/active_record/relation/query_methods.rb', line 1227 def offset(value) spawn.offset!(value) end |