title: Datalist in rails form
body: <p>A really noob question, but i try with different options and I dont get it.</p>
  <p>I Have a form for a new &quot;Cancha&quot; and a field that references to &quot;Mmpp&quot;, In the field mmpp_id i need to see a list with the differents kinds of &quot;Mmpp&quot; (already created some options), right now if I put for example &quot;1&quot; i get Mmpp:0x00007f7fb1600378 in the show, Already change the show to &lt;%= @cancha.mmpp.nombre %&gt; and I get exactly what I want in the show, but the problem is in the form I need a list to pick.
  Thanks in advance</p>
  <pre><code>    &lt;%= form.text_field :mmpp_id, class: 'form-control' %&gt;
  </code></pre>
  <pre><code>create_table &quot;canchas&quot;, force: :cascade do |t|
      t.string &quot;nombre&quot;
      t.string &quot;descripcion&quot;
      t.integer &quot;capacidad&quot;
      t.boolean &quot;operativa&quot;
      t.bigint &quot;mmpp_id&quot;, null: false
      t.datetime &quot;created_at&quot;, precision: 6, null: false
      t.datetime &quot;updated_at&quot;, precision: 6, null: false
      t.index [&quot;mmpp_id&quot;], name: &quot;index_canchas_on_mmpp_id&quot;
  </code></pre>
  <pre><code>create_table &quot;mmpps&quot;, force: :cascade do |t|
      t.string &quot;nombre&quot;
      t.string &quot;descripcion&quot;
      t.integer &quot;densidad&quot;
      t.datetime &quot;created_at&quot;, precision: 6, null: false
      t.datetime &quot;updated_at&quot;, precision: 6, null: false
    end
  </code></pre>