diff --git a/lib/rails-settings/fields/base.rb b/lib/rails-settings/fields/base.rb index 76239d0..295a847 100644 --- a/lib/rails-settings/fields/base.rb +++ b/lib/rails-settings/fields/base.rb @@ -33,9 +33,9 @@ def default_value end def read - return deserialize(default_value) if readonly || saved_value.nil? - - deserialize(saved_value) + stored_value = saved_value + return deserialize(default_value) if readonly || stored_value.nil? + deserialize(stored_value) end def deserialize(value)