<%= content_tag :div, id: "#{field.name}_wrapper", class: field.html_class, 'data-dependency' => field.dependency_json do concat label_tag field.name, field.label << ("*" if field.required?).to_s concat hidden_field_tag field.name, 0 concat check_box_tag field.name, 1, field.checked?, field.attributes.except(:class, :checked) unless field.error.empty? concat content_tag :span, field.error, class: 'error' end end %> <%= field.attributes.inspect %>