diff options
-rwxr-xr-x | actionmailer/lib/action_mailer.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/actionmailer/lib/action_mailer.rb b/actionmailer/lib/action_mailer.rb index a489e32bac..894bc824ee 100755 --- a/actionmailer/lib/action_mailer.rb +++ b/actionmailer/lib/action_mailer.rb @@ -21,11 +21,10 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #++ -begin - require 'action_controller' -rescue LoadError +unless defined?(ActionController) begin - require File.dirname(__FILE__) + '/../../actionpack/lib/action_controller' + $:.unshift "#{File.dirname(__FILE__)}/../../actionpack/lib" + require 'action_controller' rescue LoadError require 'rubygems' require_gem 'actionpack', '>= 1.9.1' @@ -48,4 +47,4 @@ ActionMailer::Base.class_eval do helper MailHelper end -silence_warnings { TMail::Encoder.const_set("MAX_LINE_LEN", 200) }
\ No newline at end of file +silence_warnings { TMail::Encoder.const_set("MAX_LINE_LEN", 200) } |