Improved error handling.

This commit is contained in:
Martin Edenhofer 2015-07-12 00:37:31 +02:00
parent 47f73d91e3
commit ca42df1ef6

View file

@ -1059,6 +1059,7 @@ check string/varchar size and cut them if needed
next if self[ attribute[0] ].class != String
next if self[ attribute[0] ].empty?
column = self.class.columns_hash[ attribute[0] ]
next if !column
limit = column.limit
if column && limit
current_length = attribute[1].to_s.length