Reputation: 9666
I currently have this as my dropdown:
<%= f.select :supplier, options_for_select(@supplier) %>
in my controller I have:
@software = Software.new
@supplier = Supplier.all
the form is for new software, the drop down should pull the suppliers from the supplier table which is completely unrelated to any other table. i then want the supplier field in the software form to be filled with one of the entries in the supplier table. at the moment my code just comes up with something like:
#<Supplier:0x000052e5c89>
Upvotes: 1
Views: 173