<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>KongariBug</author_name>
  <author_url>https://blog.hatena.ne.jp/KongariBug/</author_url>
  <blog_title>こんがりぃ</blog_title>
  <blog_url>https://kongaribug.hatenablog.com/</blog_url>
  <categories>
    <anon>Rails</anon>
    <anon>javascript</anon>
  </categories>
  <description>環境 Rails: 5.2.2 Ruby: 2.5.3 問題 題名の通り。今回やりたかったことは「選択してください」みたいな選択肢を入れるので空白の選択肢は必要なかった。 結論 そういうものらしい？ `select` form helpers with `required: true` generate a blank option even when one is already present · Issue #31083 · rails/rails · GitHub なので空白の選択肢をjavascriptで消すか、今回の場合は空白の選択肢にテキストをjqueryで挿入した。 $('#f…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkongaribug.hatenablog.com%2Fentry%2F2019%2F02%2F03%2F232920&quot; title=&quot;Rails: selectボックスでrequired: trueにしたときinclude_blank: falseがきかない - こんがりぃ&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>2019-02-03 23:29:20</published>
  <title>Rails: selectボックスでrequired: trueにしたときinclude_blank: falseがきかない</title>
  <type>rich</type>
  <url>https://kongaribug.hatenablog.com/entry/2019/02/03/232920</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
