activerecord-mysql-unsigned icon indicating copy to clipboard operation
activerecord-mysql-unsigned copied to clipboard

Introspectively add numeric, >=0, null validations for unsigned columns

Open saizai opened this issue 9 years ago • 0 comments

It'd be nice if the gem automatically made integer columns have validations (via introspection), e.g.:

validates column, numericality: { only_integer: true, greater_than_or_equal_to: 0, presence: !column_allows_nil }

saizai avatar Apr 02 '15 07:04 saizai