lib/rails-settings/fields/integer.rb in rails-settings-cached-2.9.1 vs lib/rails-settings/fields/integer.rb in rails-settings-cached-2.9.2
- old
+ new
@@ -1,8 +1,10 @@
module RailsSettings
module Fields
class Integer < ::RailsSettings::Fields::Base
def deserialize(value)
+ return nil if value.nil?
+
value.to_i
end
def serialize(value)
deserialize(value)