method
offset
v3.2.13 -
Show latest stable
- Class:
ActiveRecord::QueryMethods
offset(value)public
No documentation available.
# File activerecord/lib/active_record/relation/query_methods.rb, line 154
def offset(value)
relation = clone
relation.offset_value = value
relation
end 1Note
doesn't work directly off a class.
for some reason this method only works on relation objects, not directly on an AR class.
# doesn't work
User.offset(3).limit(1)
# does work
User.limit(1).offset(3)
there's an closed ticket for this here http://rails.lighthouseapp.com/projects/8994/tickets/5688-modeloffsetxlimitx-unknown-offset-method-exception and should be resolved in the next release of rails.