diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2006-06-21 20:37:09 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2006-06-21 20:37:09 +0000 |
commit | e381eccbe2b913766c3bd737584e26a16319ab9a (patch) | |
tree | e450e18fbbf96e9f06fa97023172d08df196b842 | |
parent | a28817948dd41bdf921a0976d711e955d959dda2 (diff) | |
download | rails-e381eccbe2b913766c3bd737584e26a16319ab9a.tar.gz rails-e381eccbe2b913766c3bd737584e26a16319ab9a.tar.bz2 rails-e381eccbe2b913766c3bd737584e26a16319ab9a.zip |
prefer sibling actionpack
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4481 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-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) } |