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

Version Path
thecore_ui_rails_admin-3.2.9 app/views/rails_admin/main/_form_boolean.html.erb
thecore_ui_rails_admin-3.2.8 app/views/rails_admin/main/_form_boolean.html.erb
thecore_ui_rails_admin-3.2.7 app/views/rails_admin/main/_form_boolean.html.erb
thecore_ui_rails_admin-3.2.6 app/views/rails_admin/main/_form_boolean.html.erb
thecore_ui_rails_admin-3.2.5 app/views/rails_admin/main/_form_boolean.html.erb
thecore_ui_rails_admin-3.2.4 app/views/rails_admin/main/_form_boolean.html.erb
thecore_ui_rails_admin-3.2.3 app/views/rails_admin/main/_form_boolean.html.erb
thecore_ui_rails_admin-3.2.2 app/views/rails_admin/main/_form_boolean.html.erb
thecore_ui_rails_admin-3.2.1 app/views/rails_admin/main/_form_boolean.html.erb
thecore_ui_rails_admin-3.2.0 app/views/rails_admin/main/_form_boolean.html.erb
thecore_ui_rails_admin-3.1.6 app/views/rails_admin/main/_form_boolean.html.erb
thecore_ui_rails_admin-3.1.5 app/views/rails_admin/main/_form_boolean.html.erb
thecore_ui_rails_admin-3.1.4 app/views/rails_admin/main/_form_boolean.html.erb
thecore_ui_rails_admin-3.1.3 app/views/rails_admin/main/_form_boolean.html.erb
thecore_ui_rails_admin-3.1.2 app/views/rails_admin/main/_form_boolean.html.erb