<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>tanakanoblogdesu</author_name>
  <author_url>https://blog.hatena.ne.jp/tanakanoblogdesu/</author_url>
  <blog_title>tanalog</blog_title>
  <blog_url>https://tanakanoblogdesu.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>今回はgem ransackで検索機能を実装します。 以前の記事でフリーワード検索を実装したのですが、今回は作成日での検索とセレクトボックスでの検索を実装していきます。 1つ前の記事で作ったscaffoldアプリを元にやっていきます。 このアプリではi18n、enum、enum_helpを導入済みです。 ではいってみましょう。 ransackをインストール gemfileに gem 'ransack' として bundle install します。 コントローラー編集 コントローラーで検索結果を受け取れるようにします。 def index # @users = User.all これを削除 @…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftanakanoblogdesu.hatenablog.com%2Fentry%2F2021%2F05%2F26%2F012630&quot; title=&quot;ransackの検索機能 - tanalog&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>https://i.gyazo.com/b08f2b149a81c325b7d65adb48f1de4a.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2021-05-26 01:26:30</published>
  <title>ransackの検索機能</title>
  <type>rich</type>
  <url>https://tanakanoblogdesu.hatenablog.com/entry/2021/05/26/012630</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
