I have a select
called "priority" that has 3 options: high, medium and low.
I would like that when you select high, I put the name "high" in red, "medium" in yellow and "low" in green. So in my view, I will get my list of priorities with the names: high, medium, low in these 3 colors to quickly see which priorities are more important than others.
Code of select
:
<% form.select :prioridad, ["alta", "media", "baja"], id: : tarea_prioridad %>
What I intend to do, but I do not succeed, is the following:
<% form.select :prioridad, ["alta", {syle=>color:"red"},"media",{syle=>color:"green"}, "baja",{syle=>color:"yellow"}], id: : tarea_prioridad %>