<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>hidewood</author_name>
  <author_url>https://blog.hatena.ne.jp/hidewood/</author_url>
  <blog_title>The ブログ（仮）</blog_title>
  <blog_url>https://hidewood.hatenadiary.org/</blog_url>
  <categories>
  </categories>
  <description>Railsにはpaginateという便利なメソッドがあって、googleみたいにたくさんの検索結果を 複数ページにわけるのが簡単にできる。(Previous, Nextとかページの最後に表示されるやつ。） こちらのページがわかりやすい。問題は、自前でSQL文を書いてfind_by_sqlでデータを引っ張ってきているときだ。 paginageはrails備え付けのfindメソッドを使っているとき用に書かれているので、 SQL文の生書きをしているときは、そのままでは使えない。railsのソース rails/actionpack/lib/action_controller/pagination.rb…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhidewood.hatenadiary.org%2Fentry%2F20071213%2F1197615895&quot; title=&quot; Railsメモ - paginateを任意のSQLで - The ブログ（仮）&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>2007-12-13 16:04:55</published>
  <title> Railsメモ - paginateを任意のSQLで</title>
  <type>rich</type>
  <url>https://hidewood.hatenadiary.org/entry/20071213/1197615895</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
