lib/usable/persistence.rb in usable-3.9.2 vs lib/usable/persistence.rb in usable-3.9.3
- old
+ new
@@ -66,10 +66,11 @@
end
def _config_file
return @_config_file if @_config_file
FileUtils.mkdir_p(usables.dir) unless File.directory?(usables.dir)
- @_config_file = File.join(usables.dir, "#{self.class.name.downcase.gsub('::', '_')}.yml")
+ filename = self.class.name ? self.class.name.downcase.gsub('::', '_') : 'usable'
+ @_config_file = File.join(usables.dir, "#{filename}.yml")
FileUtils.touch(@_config_file) unless File.exists?(@_config_file)
@_config_file
end
def _config