From e35c2043b135a95104e3eeb3e12cbcde541fa1b4 Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Mon, 23 Aug 2010 19:25:04 +0200 Subject: Include all helpers from non-namespaced engines --- actionpack/lib/action_controller/railties/paths.rb | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'actionpack/lib/action_controller/railties/paths.rb') 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 -- cgit v1.2.3