Skip to content

Commit

Permalink
Use Rails class instead of deprecated RAILS_XXX constants
Browse files Browse the repository at this point in the history
  • Loading branch information
benders committed Feb 12, 2010
1 parent 0a6c878 commit bfaa070
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/twitter_auth.rb
@@ -1,9 +1,9 @@
module TwitterAuth
class Error < StandardError; end

def self.config(environment=RAILS_ENV)
def self.config(environment=Rails.env)
@config ||= {}
@config[environment] ||= YAML.load(File.open(RAILS_ROOT + '/config/twitter_auth.yml').read)[environment]
@config[environment] ||= YAML.load(File.open(File.join(Rails.root, 'config', 'twitter_auth.yml')).read)[environment]
end

def self.base_url
Expand Down

0 comments on commit bfaa070

Please sign in to comment.