diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2012-06-13 18:01:03 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-06-13 18:01:16 -0700 |
commit | 5d50befa2edbca804a4c202f09f102d22144ad7b (patch) | |
tree | 561f7ee40b55045d529014a5582bcea2eb9b0fa8 /actionpack | |
parent | 6d7e374c5b4b41877ef362a8e1d51807f3f3b563 (diff) | |
download | rails-5d50befa2edbca804a4c202f09f102d22144ad7b.tar.gz rails-5d50befa2edbca804a4c202f09f102d22144ad7b.tar.bz2 rails-5d50befa2edbca804a4c202f09f102d22144ad7b.zip |
using hax to fix tests on Ruby 2.0
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/abstract_controller/helpers.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/actionpack/lib/abstract_controller/helpers.rb b/actionpack/lib/abstract_controller/helpers.rb index 4e0672d590..772af86770 100644 --- a/actionpack/lib/abstract_controller/helpers.rb +++ b/actionpack/lib/abstract_controller/helpers.rb @@ -132,7 +132,12 @@ module AbstractController case arg when String, Symbol file_name = "#{arg.to_s.underscore}_helper" - require_dependency(file_name, "Missing helper file helpers/%s.rb") + begin + require_dependency(file_name) + rescue LoadError => e + e.instance_variable_set(:@path, "helpers/#{e.path}") + raise + end file_name.camelize.constantize when Module arg |