Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
Rails::Initializer.run do |config| # other stuff ... config.after_initialize do if config.frameworks.include?(:action_mailer) and RAILS_ENV != 'test' smtp_config_file = File.join(RAILS_ROOT, "config", "mailer.yml") if File.exist? smtp_config_file settings = YAML::load(ERB.new(File.read(smtp_config_file)).result) config.action_mailer.smtp_settings = (settings[RAILS_ENV] || {}).symbolize_keys end end end end
This paste will be private.
From the Design Piracy series on my blog: