From 5c16a4615685eb8984bd3a5c041cf33448bbe204 Mon Sep 17 00:00:00 2001 From: pikesley Date: Mon, 1 Feb 2016 09:42:55 +0000 Subject: [PATCH] Allow decimal parts --- app/views/shared/_form.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/shared/_form.html.erb b/app/views/shared/_form.html.erb index c2e1c39..fd78b5a 100644 --- a/app/views/shared/_form.html.erb +++ b/app/views/shared/_form.html.erb @@ -18,7 +18,7 @@ %> <% else %> <% if get_type(@metric, field) == :float %> - <%= f.number_field field.to_sym, class: 'form-control' %> + <%= f.number_field field.to_sym, class: 'form-control', step: 0.1, min: 0 %> <% else %> <%= f.text_field field.to_sym, class: 'form-control' %> <% end %>