I have a form_categories
table which has a column called active
which is of type tinyint/boolean. If the form category record's active attribute is true, then it is active. If false, then it is inactive.
I have a select box that displays all of the records within the form_categories
table. I want to style the inactive
form_category options red in order to convey to the user that that form_category is inactive. Or Even better, I'd like to put in parentheses next to each inactive form_category option: (inactive)
in red letters.
Is this possible?
Below is my select box:
<%= form_tag some_path, method: :get do %>
<%= label_tag "Choose Category" %><br>
<%= select_tag :category_id, options_from_collection_for_select(FormCategory.all, :id, :name), include_blank: true %>
<% end %>