<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>su-kun1899</author_name>
  <author_url>https://blog.hatena.ne.jp/su-kun1899/</author_url>
  <blog_title>ジムには乗りたい</blog_title>
  <blog_url>https://su-kun1899.hatenablog.com/</blog_url>
  <categories>
    <anon>Rails</anon>
  </categories>
  <description>概要 検索フォームのような、チェックボックスによる複数条件を指定する UI を作ろうとしたときに、 collection_check_boxes を使うとよさそう。 collection_check_boxes | Railsドキュメント しかし、collection_check_boxes のオプションだけだと input の属性くらいしかいじれないため、 label の class までカスタマイズするのは難しい。 collection_check_boxes にブロックを渡すとブロックの引数で CheckBoxBuilder を受け取れるので、それを使うことで柔軟に変更できる。 やりたい…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsu-kun1899.hatenablog.com%2Fentry%2F2023%2F09%2F09%2F090000&quot; title=&quot;Rails の collection_check_boxes をカスタマイズする #rails - ジムには乗りたい&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://cdn.user.blog.st-hatena.com/default_entry_og_image/72315960/167293814295205</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2023-09-09 09:00:00</published>
  <title>Rails の collection_check_boxes をカスタマイズする #rails</title>
  <type>rich</type>
  <url>https://su-kun1899.hatenablog.com/entry/2023/09/09/090000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
