lib/rails-settings/settings.rb in rails-settings-cached-0.6.4 vs lib/rails-settings/settings.rb in rails-settings-cached-0.6.5
- old
+ new
@@ -53,10 +53,10 @@
result[record.var] = record.value
end
defaults = {}
if Default.enabled?
- defaults = starting_with.nil? ? Default.instance : Default.instance.fetch(starting_with, {})
+ defaults = starting_with.nil? ? Default.instance : Default.instance.select { |key, _| key.to_s.start_with?(starting_with) }
end
result.reverse_merge! defaults
result.with_indifferent_access