DRY up bootstrapSwitches with default values

This commit is contained in:
James Mason 2018-06-18 17:44:06 -07:00
parent d703dad496
commit 1e9765c163
12 changed files with 33 additions and 66 deletions

View file

@ -15,11 +15,9 @@
%td= user.created_at.strftime('%m/%d/%Y')
%td
= check_box_tag user.id, user.id, user.confirmed?,
method: :patch,
url: "/admin/users/#{user.id}/toggle_confirmation?user[to_confirm]=",
class: 'switch-checkbox',
readonly: true,
data: { size: 'small', on_color: 'success', off_color: 'warning', on_text: 'Yes', off_text: 'No' }
readonly: true
- else
%h5.text-warning.text-center
No sign ups!