diff options
author | José Valim <jose.valim@gmail.com> | 2011-11-23 19:06:45 +0000 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-11-23 19:06:45 +0000 |
commit | fd86a1b6b068df87164d5763bdcd4a323a1e76f4 (patch) | |
tree | 559eecb04f11df12756b9c43018cef32ef3ce3ef /actionpack/lib/action_controller/railties | |
parent | 3ee0116c949dfc5760d60fe9c77168fb3868a4ec (diff) | |
download | rails-fd86a1b6b068df87164d5763bdcd4a323a1e76f4.tar.gz rails-fd86a1b6b068df87164d5763bdcd4a323a1e76f4.tar.bz2 rails-fd86a1b6b068df87164d5763bdcd4a323a1e76f4.zip |
Rely on a public contract between railties instead of accessing railtie methods directly.
Diffstat (limited to 'actionpack/lib/action_controller/railties')
-rw-r--r-- | actionpack/lib/action_controller/railties/paths.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/railties/paths.rb b/actionpack/lib/action_controller/railties/paths.rb index 699c44c62c..bbe63149ad 100644 --- a/actionpack/lib/action_controller/railties/paths.rb +++ b/actionpack/lib/action_controller/railties/paths.rb @@ -6,13 +6,14 @@ module ActionController define_method(:inherited) do |klass| super(klass) - if namespace = klass.parents.detect {|m| m.respond_to?(:_railtie) } - paths = namespace._railtie.paths["app/helpers"].existent + if namespace = klass.parents.detect { |m| m.respond_to?(:railtie_helpers_paths) } + paths = namespace.railtie_helpers_paths else - paths = app.config.helpers_paths + paths = app.helpers_paths end klass.helpers_path = paths + if klass.superclass == ActionController::Base && ActionController::Base.include_all_helpers klass.helper :all end |