# Load in the relevant yaml file, to set them in the Rails configuration object
def foursquare_api_config
  foursquare_config = YAML.load_file("#{Rails.root}/config/foursquare.yml")
  foursquare_config[Rails.env]
end

# Add the details to the config object
Rails.configuration.foursquare_client_id = foursquare_api_config['client_id']
Rails.configuration.foursquare_client_secret = foursquare_api_config['client_secret']

# Load in the relevant yaml file, to set them in the Rails configuration object
def foursquare_api_config
  foursquare_config = YAML.load_file("#{Rails.root}/config/foursquare.yml")
  foursquare_config[Rails.env]
end

# Add the details to the config object
Rails.configuration.foursquare_client_id = ENV['FOURSQUARE_CLIENT_ID'] || foursquare_api_config['client_id']
Rails.configuration.foursquare_client_secret = ENV['FOURSQUARE_CLIENT_ID'] || foursquare_api_config['client_secret']

Allow us to set variables through ENV as well as yaml
Allow us to set variables through ENV as well as yaml

for heroku