<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,5 +1,8 @@
 *SVN*
 
+* Provide a helper proxy to access helper methods from outside views. Closes #10839 [Josh Peek]
+  e.g. ApplicationController.helpers.simple_format(text)
+
 * Improve documentation. [Xavier Noria, leethal, jerome]
 
 * Ensure RJS redirect_to doesn't html-escapes string argument. Closes #8546 [josh, eventualbuddha, Pratik]</diff>
      <filename>actionpack/CHANGELOG</filename>
    </modified>
    <modified>
      <diff>@@ -167,6 +167,15 @@ module ActionController #:nodoc:
         attrs.flatten.each { |attr| helper_method(attr, &quot;#{attr}=&quot;) }
       end
 
+      # Provides a proxy to access helpers methods from outside the view.
+      def helpers
+        unless @helper_proxy
+          @helper_proxy = ActionView::Base.new
+          @helper_proxy.extend master_helper_module
+        else
+          @helper_proxy
+        end
+      end
 
       private
         def default_helper_module!</diff>
      <filename>actionpack/lib/action_controller/helpers.rb</filename>
    </modified>
    <modified>
      <diff>@@ -130,6 +130,22 @@ class HelperTest &lt; Test::Unit::TestCase
     assert methods.include?('foobar')
   end
 
+  def test_helper_proxy
+    methods = ApplicationController.helpers.methods.map(&amp;:to_s)
+
+    # ActionView
+    assert methods.include?('pluralize')
+
+    # abc_helper.rb
+    assert methods.include?('bare_a')
+
+    # fun/games_helper.rb
+    assert methods.include?('stratego')
+
+    # fun/pdf_helper.rb
+    assert methods.include?('foobar')
+  end
+
   private
     def expected_helper_methods
       TestHelper.instance_methods.map(&amp;:to_s)</diff>
      <filename>actionpack/test/controller/helper_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>5b822aca4b6524c9147224764ec0f20a728ba2a1</id>
    </parent>
  </parents>
  <author>
    <name>Josh Peek</name>
    <login>josh</login>
    <email>josh@joshpeek.com</email>
  </author>
  <url>http://github.com/rails/rails/commit/917423d664038d6791738a73ad1446437dbb71df</url>
  <id>917423d664038d6791738a73ad1446437dbb71df</id>
  <committed-date>2008-04-06T11:42:34-07:00</committed-date>
  <authored-date>2008-04-06T11:42:34-07:00</authored-date>
  <message>Provide a helper proxy to access helper methods from outside views. Closes #10839 [Josh Peek]


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9234 5ecf4fe2-1ee6-0310-87b1-e25e094e27de</message>
  <tree>bda3e8810f16831767e69102db409152695ea523</tree>
  <committer>
    <name>Josh Peek</name>
    <login>josh</login>
    <email>josh@joshpeek.com</email>
  </committer>
</commit>
