From 56c2959bd77c59989a75eaf22cf217b67cab509c Mon Sep 17 00:00:00 2001 From: Daniel Schierbeck Date: Mon, 6 Sep 2010 00:29:56 +0800 Subject: [PATCH] Infer the step attr from the DB column type instead --- lib/simple_form/inputs/numeric_input.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/simple_form/inputs/numeric_input.rb b/lib/simple_form/inputs/numeric_input.rb index 6964b651..9a68859a 100644 --- a/lib/simple_form/inputs/numeric_input.rb +++ b/lib/simple_form/inputs/numeric_input.rb @@ -33,7 +33,7 @@ module SimpleForm input_options[:min] ||= options[:greater_than_or_equal_to] input_options[:max] ||= options[:less_than_or_equal_to] - input_options[:step] ||= options[:only_integer] && 1 + input_options[:step] ||= input_type == :integer && 1 end def find_numericality_validator(model_class)