Reputation: 9184
In my db i have 3 fields:
name, cost, active
How can i display in select (form) only that values, on which active field is true(1)? Now i have such code:
= f.select :shipping_id, [["Select", "0"]] + @shippings.map{ |c| [c.name, c.id]}, {:required => true}
How to map, only if active is true?
Note! i must done it only in view!
Upvotes: 0
Views: 303