Assuming it's a yaml file, completely untested:
require "yaml"
class ApplicationController < ActionController::Base
MY_CONFIG = YAML.load(File.read(File.join(RAILS_ROOT, "config",
"my_config.yml")))
end
Now you can simply access MY_CONFIG from all your controllers.
The application controller seems the right place to put the method to
read in the data. For it to be available to all controllers in their
methods, you probably want to put it into a class variable...
--
Posted via http://www.ruby-forum.com/.