I am trying to show concatenated information in the drop downs text.
This is what I have:
<%=collection_select(:product, 'prod_name', @prods, :id,
"#{:category.name - :prod_name}", {:prompt => 'Select Product'})%>
Product belongs_to category.
So i can do the following which works fine:
@p = Product.all
@p.first.prod_name
@p.first.category.name
So eventually i want a drop down that has categoryname - product name
For example: if category name is Edible and product name is Brownie then in drop down i want
Edible - Brownie