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

@ -78,13 +78,8 @@
%b Included in the Cfp?
%td
= check_box_tag "#{@conference.short_title}_#{@track.short_name}", @track.id, @track.cfp_active,
class: 'switch-checkbox', method: :patch,
url: toggle_cfp_inclusion_admin_conference_program_track_path(@conference.short_title, id: @track.short_name)+"?included=",
data: { size: 'small',
on_color: 'success',
off_color: 'warning',
on_text: 'Yes',
off_text: 'No' }
class: 'switch-checkbox',
url: toggle_cfp_inclusion_admin_conference_program_track_path(@conference.short_title, id: @track.short_name)+"?included="
%tr
%td
%b State