% cache(content) do %>
<%- select_values = content_settings_value(content,
:select_values, local_assigns.fetch(:options, {})) -%>
<%= label_and_remove_link(content) %>
<% if select_values.nil? %>
<%= warning(':select_values is nil', "No select values given.
Please provide :select_values
either as argument to render_essence_editor
helper or as setting on the content definition in elements.yml
.".html_safe) %>
<% else %>
<% if select_values.is_a?(Hash)
options_tags = grouped_options_for_select select_values,
content.ingredient, ''
else
options_tags = options_for_select select_values,
content.ingredient
end %>
<%= select_tag content.form_field_name, options_tags, {
class: ["alchemy_selectbox", "essence_editor_select", html_options[:class]].join(' '),
style: html_options[:style]
} %>
<% end %>
<% end %>