plataformatec/simple_form — Issue #400: maxlength incorrectly added to bigint as string field
Author: s01ipsist
Created: 2012-01-05 02:13:08+00:00
State: open

When :limit is added to an integer column definition
t.integer "a_big_integer", :limit => 8
it has a different meaning to when added to a string column

:limit => 8
means that a big integer should be used by the database (as opposed to a string of 8 characters)

If I then use this column with a string field (not an unreasonable option?)
= f.input :a_big_integer, :label => "question", :as => :string
the maxlength attribute is set to 8 incorrectly

I don't think that you can automagic a maxlength attribute from the limit attribute on an integer column.