Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
## config/initializers/load_config.rb require 'yaml' require 'ostruct' # Read in our config file or get a hash if its missing config = YAML.load_file(File.join(Rails.root, 'config/app.yml'))[Rails.env] rescue {} RAILS_APP_CONFIG = OpenStruct.new(config) # Inject our config as Rails.app.config or Rails::App.config module Rails module App def self.config RAILS_APP_CONFIG end end def self.app App end end
This paste will be private.
From the Design Piracy series on my blog: