<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>iriya_0624</author_name>
  <author_url>https://blog.hatena.ne.jp/iriya_0624/</author_url>
  <blog_title>戯言メイテル</blog_title>
  <blog_url>https://iriya-0624.hatenadiary.org/</blog_url>
  <categories>
    <anon>Ruby on Rails</anon>
  </categories>
  <description>やりたいこと Ruby on RailsでプルダウンメニューをDBの値から生成したい。 各話テーブルのレコードを作成する際に、親となるアニメをプルダウンから選択したい場合など。 方法 collection_selectを使用 Viewのerbファイルにて下記の様に記載 &lt;%= f.collection_select :anime_id, Anime.all, :id, :title %&gt; 第1引数[:anime_id] 値を登録するDB上のカラム名 第2引数[Anime.all] プルダウンを構成するデータを取得するためのActiveRecordの取得メソッド 第3引数[:id] DBに登録す…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Firiya-0624.hatenadiary.org%2Fentry%2F20130429%2F1367243032&quot; title=&quot;Ruby on RailsでプルダウンメニューをDBの値から作成する方法 - 戯言メイテル&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>2013-04-29 22:43:52</published>
  <title>Ruby on RailsでプルダウンメニューをDBの値から作成する方法</title>
  <type>rich</type>
  <url>https://iriya-0624.hatenadiary.org/entry/20130429/1367243032</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
