lib/super_settings/storage.rb in super_settings-1.0.0 vs lib/super_settings/storage.rb in super_settings-1.0.1

- old
+ new

@@ -8,10 +8,12 @@ end def self.included(base) base.extend(ClassMethods) base.include(Attributes) unless base.instance_methods.include?(:attributes=) + + base.instance_variable_set(:@load_asynchronous, nil) end module ClassMethods # Storage classes must implent this method to return all settings included deleted ones. # @@ -74,10 +76,10 @@ # Return true if it's safe to load setting asynchronously in a background thread. # # @return [Boolean] def load_asynchronous? - !!((defined?(@load_asynchronous) && !@load_asynchronous.nil?) ? @load_asynchronous : default_load_asynchronous?) + !!(@load_asynchronous.nil? ? default_load_asynchronous? : @load_asynchronous) end # Set to true to force loading setting asynchronously in a background thread. attr_writer :load_asynchronous