source: subversion/sites/rails_port/config/initializers/action_mailer.rb @ 17445

Last change on this file since 17445 was 15595, checked in by tomhughes, 10 years ago

Removed patch for rails 2.2 bug.

File size: 600 bytes
Line 
1# Configure ActionMailer SMTP settings
2ActionMailer::Base.smtp_settings = {
3  :address => 'localhost',
4  :port => 25, 
5  :domain => 'localhost',
6}
7
8# Monkey patch to allow sending of messages in specific locales
9module ActionMailer
10  class Base
11    adv_attr_accessor :locale
12  private
13    alias_method :old_render_message, :render_message
14
15    def render_message(method_name, body)
16      old_locale= I18n.locale
17
18      begin
19        I18n.locale = @locale
20        message = old_render_message(method_name, body)
21      ensure
22        I18n.locale = old_locale
23      end
24
25      message
26    end
27  end
28end
Note: See TracBrowser for help on using the repository browser.