Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

how to use custom switch in rails

<%= form_with(model: employee, local: true) do |form| %>
 <div class="custom-control custom-switch">
    <%= form.check_box :active, class: "custom-control-input", id: "customSwitch1"   %>
  <label class="custom-control-label" for="customSwitch1">Status: </label>
 </div>
 <div class="actions">
     <%= form.submit %>
 </div>
<% end %>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #custom #switch #rails
ADD COMMENT
Topic
Name
2+8 =