<%= content_tag :div, class: 'field', style: local_assigns[:style] do %>
  <%= f.number_field attr,
                   value: local_assigns[:value] || f.object.public_send(attr),
                   class: local_assigns[:class],
                   min: local_assigns[:min],
                   max: local_assigns[:max],
                   step: local_assigns[:step],

                   disabled: local_assigns[:disabled]%>
  <%= f.label attr, local_assigns[:label] unless local_assigns[:skip_label] %>
  <%- f.object.errors.full_messages_for(attr).uniq.each do |msg| -%>
    <%= content_tag :p, msg, role: 'alert' %>
  <% end %>
<%- end -%>
