aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/railties
diff options
context:
space:
mode:
authorPiotr Sarnacki <drogus@gmail.com>2010-08-23 19:25:04 +0200
committerPiotr Sarnacki <drogus@gmail.com>2010-09-03 22:59:13 +0200
commite35c2043b135a95104e3eeb3e12cbcde541fa1b4 (patch)
tree896b91d776eac389300edd653ed20c88fcf11218 /actionpack/lib/action_controller/railties
parent98ab4ded376c3d04540bdbdfe6dbbf88c0738701 (diff)
downloadrails-e35c2043b135a95104e3eeb3e12cbcde541fa1b4.tar.gz
rails-e35c2043b135a95104e3eeb3e12cbcde541fa1b4.tar.bz2
rails-e35c2043b135a95104e3eeb3e12cbcde541fa1b4.zip
Include all helpers from non-namespaced engines
Diffstat (limited to 'actionpack/lib/action_controller/railties')
-rw-r--r--actionpack/lib/action_controller/railties/paths.rb12
1 files changed, 3 insertions, 9 deletions
diff --git a/actionpack/lib/action_controller/railties/paths.rb b/actionpack/lib/action_controller/railties/paths.rb
index 81d03f5e73..e1b318b566 100644
--- a/actionpack/lib/action_controller/railties/paths.rb
+++ b/actionpack/lib/action_controller/railties/paths.rb
@@ -1,22 +1,16 @@
module ActionController
module Railties
module Paths
- def self.with(_app)
+ def self.with(app)
Module.new do
define_method(:inherited) do |klass|
super(klass)
if namespace = klass.parents.detect {|m| m.respond_to?(:_railtie) }
- app = namespace._railtie
+ klass.helpers_path = namespace._railtie.config.paths.app.helpers.to_a
else
- app = _app
+ klass.helpers_path = app.config.helpers_paths
end
- paths = app.config.paths
- options = app.config.action_controller
-
- options.helpers_path ||= paths.app.helpers.to_a
- options.each { |k,v| klass.send("#{k}=", v) }
-
klass.helper :all
end
end