diff options
author | Guillermo Iguaran <guilleiguaran@gmail.com> | 2013-10-23 22:58:29 -0700 |
---|---|---|
committer | Guillermo Iguaran <guilleiguaran@gmail.com> | 2013-10-23 22:58:29 -0700 |
commit | 80e90b0bd0b0cd50a186e314034d68182c045765 (patch) | |
tree | 48e03cefab7b9bc5d2a95b322caf6dd59757baac /actionpack/lib | |
parent | 783527fd877c491cf5f2f563ee42d5bc19e1b78b (diff) | |
parent | 719f1d68e4945332f71dc8ad93141780e60929b5 (diff) | |
download | rails-80e90b0bd0b0cd50a186e314034d68182c045765.tar.gz rails-80e90b0bd0b0cd50a186e314034d68182c045765.tar.bz2 rails-80e90b0bd0b0cd50a186e314034d68182c045765.zip |
Merge pull request #12622 from timsly/helpers-from-outside
pass app config to controller helper proxy
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/metal/helpers.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/metal/helpers.rb b/actionpack/lib/action_controller/metal/helpers.rb index b53ae7f29f..a9c3e438fb 100644 --- a/actionpack/lib/action_controller/metal/helpers.rb +++ b/actionpack/lib/action_controller/metal/helpers.rb @@ -73,7 +73,11 @@ module ActionController # Provides a proxy to access helpers methods from outside the view. def helpers - @helper_proxy ||= ActionView::Base.new.extend(_helpers) + @helper_proxy ||= begin + proxy = ActionView::Base.new + proxy.config = config.inheritable_copy + proxy.extend(_helpers) + end end # Overwrite modules_for_helpers to accept :all as argument, which loads |