Skip to content

Instantly share code, notes, and snippets.

@jjn1056
Created June 19, 2020 14:33
Show Gist options
  • Save jjn1056/1aaa8d17bc66a2806b54747abd0a28a7 to your computer and use it in GitHub Desktop.
Save jjn1056/1aaa8d17bc66a2806b54747abd0a28a7 to your computer and use it in GitHub Desktop.
<div class='form-group'>
%= model_errors_for 'person_roles', max_errors=>1, class=>'alert alert-danger', role=>'alert';
<fieldset class="border p-2">
<legend class="w-auto"><%= $model->human_attribute_name('person_roles') %></legend>
%= checkbox_from_related 'person_roles', 'role', label => 1, checkbox_attrs => +{class=>'form-check-input'}, begin
<div class="form-check">
% my ($checkbox, $label) = @_;
%= $checkbox;
%= $label;
</div>
% end
</fieldset>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment