1
0
Fork 0
mirror of https://github.com/heartcombo/simple_form.git synced 2022-11-09 12:19:26 -05:00

Infer the step attr from the DB column type instead

This commit is contained in:
Daniel Schierbeck 2010-09-06 00:29:56 +08:00 committed by Carlos Antonio da Silva
parent b1b51c56f3
commit 56c2959bd7

View file

@ -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)