Sha256: a36886f83eefde017ee424bd89d28d4bea2d31e9ea010798f47f5da47c3f7c7f

Contents?: true

Size: 961 Bytes

Versions: 1

Compression:

Stored size: 961 Bytes

Contents

<div class="field <%= options.delete(:field_class) %>">

  <% if has_label %>
    <%- label_options[:class] << ' label' %>
    <%- label_options[:class] << ' required' if html_options.delete(:required) %>
    <%= label attribute_name, label_text, label_options %>
  <% end %>

  <div class="control <%= options.delete(:control_class) %>">
    <%- html_options[:class] << ' select' %>
    <%- html_options[:class] << ' is-danger' if errors[attribute_name].present? %>
    <div class="<%= html_options[:class] %>">
      <%= collection_select(
            attribute_name,
            collection,
            value_method,
            text_method,
            options,
            html_options) %>
    </div>
  </div>

  <%- if hint_text.present? %>
    <p class="help"><%= hint_text %></p>
  <%- end %>

  <%- if errors[attribute_name].present? %>
    <p class="help is-danger"><%= errors.full_messages_for(attribute_name).to_sentence %></p>
  <%- end %>

</div>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
template_form-0.4.3 lib/template_form/templates/bulma/select_input.html.erb