<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>shinkufencer</author_name>
  <author_url>https://blog.hatena.ne.jp/shinkufencer/</author_url>
  <blog_title>コード日進月歩</blog_title>
  <blog_url>https://shinkufencer.hateblo.jp/</blog_url>
  <categories>
    <anon>Rails</anon>
    <anon>Ruby</anon>
    <anon>Tips</anon>
  </categories>
  <description>普通に勘違いしていたのでメモ 要約 kaminariはページネーション用のgemでページ指定ができるが、ページは0始まりではなく、1始まり。0を指定すると1と同等の動きをする。 環境 rails (5.2.0) kaminari (1.1.1) 実演 kaminari は Model.page({{ページ数}}).per({{1ページ当たりの件数}}) みたいな使い方します。 &gt; User.count (0.4ms) SELECT COUNT(*) FROM `users` =&gt; 3 こういうテーブルの状況だとした場合 &gt; User.page(0).per(2).pluck(:id) (0.3…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fshinkufencer.hateblo.jp%2Fentry%2F2018%2F06%2F12%2F213557&quot; title=&quot;Rubyのgem, kaminari での pagenationの値の始まりは1から - コード日進月歩&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2018-06-12 21:35:57</published>
  <title>Rubyのgem, kaminari での pagenationの値の始まりは1から</title>
  <type>rich</type>
  <url>https://shinkufencer.hateblo.jp/entry/2018/06/12/213557</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
