Forum: Italian Ruby user group Helper Select

Posted by Dboz Dboz (dbozz)
on 2009-06-08 12:40
Utilizzando l'helper select in questo modo

select("post", "category", Post::CATEGORIES, {:include_blank => true})

ottengo:

  <select name="post[category]">
    <option></option>
    <option>joke</option>
    <option>poem</option>
  </select>

Come devo utilizzare lo stesso helper per ottenere

  <select name="post[category]">
    <option value=""></option>
    <option value="0">joke</option>
    <option value="1">poem</option>
  </select>
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.