Skip to content
Browse files

prefer sibling actionpack

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4481 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent a288179 commit e381eccbe2b913766c3bd737584e26a16319ab9a @jeremy jeremy committed Jun 21, 2006
Showing with 4 additions and 5 deletions.
  1. +4 −5 actionmailer/lib/action_mailer.rb
View
9 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 @@
helper MailHelper
end
-silence_warnings { TMail::Encoder.const_set("MAX_LINE_LEN", 200) }
+silence_warnings { TMail::Encoder.const_set("MAX_LINE_LEN", 200) }

0 comments on commit e381ecc

Please sign in to comment.
Something went wrong with that request. Please try again.