<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>Thoames1212</author_name>
  <author_url>https://blog.hatena.ne.jp/Thoames1212/</author_url>
  <blog_title>とーますメモ</blog_title>
  <blog_url>https://thoames.hatenadiary.jp/</blog_url>
  <categories>
    <anon>Rails</anon>
    <anon>HTML</anon>
  </categories>
  <description>ググってもさっくり結果が出なかったので自分用のメモ。select - リファレンス - - Railsドキュメント上記の公式ページを見ると、 optionsの設定には、「options_for_select」を使用しているが :selectedを指定している例がなかったので調べたら、 やっぱり「options_for_select」でそういう設定ができた。 &lt;%= select_tag 'prefecture', options_for_select(prefecture_options, :selected =&gt; selected_prefecture), :style =&gt; 'width:…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fthoames.hatenadiary.jp%2Fentry%2F2017%2F12%2F16%2F042206&quot; title=&quot;【Rails】select_tag使用時にデフォルト値を設定する方法 - とーますメモ&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>2017-12-16 04:22:06</published>
  <title>【Rails】select_tag使用時にデフォルト値を設定する方法</title>
  <type>rich</type>
  <url>https://thoames.hatenadiary.jp/entry/2017/12/16/042206</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
