You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

19 lines
556 B

<%= tag.div class: 'field' do %>
<div>
<%= f.label attr, local_assigns[:label], for: nil unless local_assigns[:skip_label] %>
</div>
<div>
<%= f.label attr, class: "icon-cb toogle #{attr}", title: local_assigns[:title] do %>
<% if attr.to_s.ends_with?("_at") %>
<%= f.check_box attr, {}, f.object.public_send(attr) || Time.now, 0 %>
<% else %>
<%= f.check_box attr %>
<% end %>
<span class="cm"><span>check_box_outline_blank</span><span>check_box</span></span>
<%- end -%>
</div>
<%- end -%>