In a Rails app, I’ve got an array that is a list of entry types: ["steps", "calories", "water", "sodium", "sugar", "fruits_veggies"]
In my view, I’m creating a select box to choose one of the above entry types: .controls= f.select :type, entry_type_options
This works just fine, but I’d like to replace “fruits_veggies” with “fruits & veggies” in the dropdown box. How can I do this for a single value? options_for_select looked promising, but I’m not sure what route to take.
Note that I’m using a helper for “entry_type_options”:
def entry_type_options
@entry_type_options ||= Entry::TYPES.map {|t| [t.capitalize, t] }
end
This is definitely a case of being up too late. I just changed the helper: