Get and display all values from database row separately based on select (Rails)
问题 Hi i'm stuck making an invoicing application. I want to have an option where you can add an existing customer from the customers table and add those values to the invoice. The values i want to display are company_name , vat_number and iban_number . I tried doing this: <%= select_tag 'choose customer', options_from_collection_for_select(current_user.customers.all, 'id', 'company_name') %> But obviously this only gets the value of company_name . I tried using collection.select but that one also