lib/rails-settings/default.rb in rails-settings-cached-0.6.5 vs lib/rails-settings/default.rb in rails-settings-cached-0.6.6

- old
+ new

@@ -17,11 +17,11 @@ @source || Rails.root.join('config/app.yml') end def [](key) # foo.bar.dar Nested fetch value - return instance[key] if instance.has_key?(key) + return instance[key] if instance.key?(key) keys = key.to_s.split('.') val = instance keys.each do |k| val = val.fetch(k.to_s, nil) break if val.nil? @@ -38,9 +38,9 @@ def initialize content = open(self.class.source_path).read hash = content.empty? ? {} : YAML.load(ERB.new(content).result).to_hash hash = hash[Rails.env] || {} - self.replace hash + replace hash end end end