Inspired from Max’s answer:
= f.collection_check_boxes :service_ids, @services, :id, :name do |b|
.input-checkbox.input-checkbox--switch
= b.check_box
= label_tag b, '', { for: "shop_service_ids_#{b.value}" }
%span= b.text
CLICK HERE to find out more related problems solutions.