Sha256: cc26a3c5aa50631a9dc4aabd7b6209fc39894448f85c9a622b2d1502fa89484c

Contents?: true

Size: 966 Bytes

Versions: 7

Compression:

Stored size: 966 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 <%= html_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

7 entries across 7 versions & 1 rubygems

Version Path
template_form-0.4.10 lib/template_form/templates/bulma/select_input.html.erb
template_form-0.4.9 lib/template_form/templates/bulma/select_input.html.erb
template_form-0.4.8 lib/template_form/templates/bulma/select_input.html.erb
template_form-0.4.7 lib/template_form/templates/bulma/select_input.html.erb
template_form-0.4.6 lib/template_form/templates/bulma/select_input.html.erb
template_form-0.4.5 lib/template_form/templates/bulma/select_input.html.erb
template_form-0.4.4 lib/template_form/templates/bulma/select_input.html.erb