aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer
diff options
context:
space:
mode:
authorEmilio Tagua <miloops@gmail.com>2009-06-10 19:54:27 -0300
committerEmilio Tagua <miloops@gmail.com>2009-06-10 19:54:27 -0300
commit247ac954132222fdd399cddc264bc1d4029f750c (patch)
tree680a07197aa207279a3455327c62843b256fe88a /actionmailer
parentd7b98b3ca855418f88a9e979d32c1710040b3038 (diff)
parent47ff57f6d14fe161900bf85e2d2cf6d7e21a1eb8 (diff)
downloadrails-247ac954132222fdd399cddc264bc1d4029f750c.tar.gz
rails-247ac954132222fdd399cddc264bc1d4029f750c.tar.bz2
rails-247ac954132222fdd399cddc264bc1d4029f750c.zip
Merge commit 'rails/master'
Diffstat (limited to 'actionmailer')
-rw-r--r--actionmailer/lib/action_mailer/helpers.rb17
1 files changed, 9 insertions, 8 deletions
diff --git a/actionmailer/lib/action_mailer/helpers.rb b/actionmailer/lib/action_mailer/helpers.rb
index 31f7de8d60..1bb8682315 100644
--- a/actionmailer/lib/action_mailer/helpers.rb
+++ b/actionmailer/lib/action_mailer/helpers.rb
@@ -48,13 +48,14 @@ module ActionMailer
file_name = arg.to_s.underscore + '_helper'
class_name = file_name.camelize
- begin
- require_dependency(file_name)
- rescue LoadError => load_error
- requiree = / -- (.*?)(\.rb)?$/.match(load_error.message).to_a[1]
- msg = (requiree == file_name) ? "Missing helper file helpers/#{file_name}.rb" : "Can't load file: #{requiree}"
- raise LoadError.new(msg).copy_blame!(load_error)
- end
+ require_dependency(file_name, "Missing helper file helpers/%s.rb")
+ # begin
+ # require_dependency(file_name)
+ # rescue LoadError => load_error
+ # requiree = / -- (.*?)(\.rb)?$/.match(load_error.message).to_a[1]
+ # msg = (requiree == file_name) ? "Missing helper file helpers/#{file_name}.rb" : "Can't load file: #{requiree}"
+ # raise LoadError.new(msg).copy_blame!(load_error)
+ # end
add_template_helper(class_name.constantize)
else
@@ -97,7 +98,7 @@ module ActionMailer
child.master_helper_module.__send__(:include, master_helper_module)
child.helper child.name.to_s.underscore
rescue MissingSourceFile => e
- raise unless e.is_missing?("helpers/#{child.name.to_s.underscore}_helper")
+ raise unless e.is_missing?("#{child.name.to_s.underscore}_helper")
end
end
end