Skip to content

Commit

Permalink
Merge pull request statsd#61 from jkamenik/master
Browse files Browse the repository at this point in the history
Fixed Rails Example
  • Loading branch information
kastner committed Feb 17, 2012
2 parents 8c5c4be + 7a7b42d commit fa40720
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions examples/ruby_example2.rb
Expand Up @@ -74,11 +74,10 @@ def self.send(data, sample_rate=1)
end
end

@@config = {}
def self.config
return @@config if @@config
return @@config if self.class_variable_defined?(:@@config)
begin
config_path = File.join(File.dir(__FILE__), "statsd.yml")
config_path = File.join(File.dirname(__FILE__), "statsd.yml")
# for Rails environments, check Rails.root/config/statsd.yml
if defined? Rails
config_path = File.join(Rails.root, "config", "statsd.yml")
Expand Down

0 comments on commit fa40720

Please sign in to comment.