Module: Twitter::Rails
- Defined in:
- lib/twitter/rails/helpers.rb,
lib/twitter/rails/controller.rb,
lib/twitter/rails/initializer.rb
Defined Under Namespace
Modules: Controller, Helpers
Class Method Summary collapse
Class Method Details
.load_configuration(twitter_yaml_file) ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/twitter/rails/initializer.rb', line 4 def load_configuration(twitter_yaml_file) twitter_yaml_file = ::Rails.root + 'config' + 'twitter.yml' if File.exists?(twitter_yaml_file) twitter_config = YAML.load(File.read(twitter_yaml_file))[RAILS_ENV] ENV['TWITTER_CONSUMER_TOKEN'] = twitter_config['token'] ENV['TWITTER_CONSUMER_SECRET'] = twitter_config['secret'] end end |