Sha256: e62ce4688b386f42ea2f39f700204130e9c3cdd13e5d8d0e78122eb5514870cc
Contents?: true
Size: 623 Bytes
Versions: 15
Compression:
Stored size: 623 Bytes
Contents
<%-cases={'1': [true, 'btn-outline-success'], '0': [false, 'btn-outline-danger']}%> <%-cases[''] = [nil, 'btn-outline-secondary'] if field.nullable? %> <div class="btn-group" role="group"> <% cases.each do |text, (value, btn_class)| %> <%= form.radio_button field.method_name, text, field.html_attributes.reverse_merge({ checked: field.form_value == value, required: field.required, class: 'btn-check' }) %> <label for="<%= form.object_name %>_<%= field.method_name %>_<%= text %>" class="<%= field.css_classes[value] %> btn <%= btn_class %>"> <%= field.labels[value].html_safe %> </label> <% end %> </div>
Version data entries
15 entries across 15 versions & 1 rubygems