Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
以下を使用して、10のうち最初の2つのレコードを取得しました
News.all.order("published_at desc").limit(2)
8つのレコードの残りを取得するにはどうすればよいですか?
当然、これら2つをスキップして、残りの8つを取得します
News.order("published_at desc").offset(2).limit(8)
(ActiveRecord 3.2.11でテスト済み)