This is the code in my model to display 10 records from a db table at a time. def self.find_5 find(:all, :order => ''id'', :limit => 5, :offset => 0) end I want to make a loop so that say if my table contains 45 records and the limit is find 5 records and the offset changes on a weekly basis and one day overlaps my last record it will continue and pull from the first record and so on. Thank you for reading. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---