aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/sprockets/helpers/isolated_helper.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-10-05 09:35:27 +0200
committerJosé Valim <jose.valim@gmail.com>2011-10-05 09:37:58 +0200
commit4cea4ee6b54fee897b984a3c0288d12ce2d1efe1 (patch)
tree55823863c055ce4004c372347d6ec24ab91cce71 /actionpack/lib/sprockets/helpers/isolated_helper.rb
parent87c57bb88f0eb1462ed31733ebcf3d9a535d8f16 (diff)
downloadrails-4cea4ee6b54fee897b984a3c0288d12ce2d1efe1.tar.gz
rails-4cea4ee6b54fee897b984a3c0288d12ce2d1efe1.tar.bz2
rails-4cea4ee6b54fee897b984a3c0288d12ce2d1efe1.zip
Fix regression when calling helpers inside sprockets.
Diffstat (limited to 'actionpack/lib/sprockets/helpers/isolated_helper.rb')
-rw-r--r--actionpack/lib/sprockets/helpers/isolated_helper.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/actionpack/lib/sprockets/helpers/isolated_helper.rb b/actionpack/lib/sprockets/helpers/isolated_helper.rb
new file mode 100644
index 0000000000..3adb928c45
--- /dev/null
+++ b/actionpack/lib/sprockets/helpers/isolated_helper.rb
@@ -0,0 +1,13 @@
+module Sprockets
+ module Helpers
+ module IsolatedHelper
+ def controller
+ nil
+ end
+
+ def config
+ Rails.application.config.action_controller
+ end
+ end
+ end
+end