1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/actionpack/lib/action_controller/railties/paths.rb
2010-09-03 22:59:13 +02:00

20 lines
520 B
Ruby

module ActionController
module Railties
module Paths
def self.with(app)
Module.new do
define_method(:inherited) do |klass|
super(klass)
if namespace = klass.parents.detect {|m| m.respond_to?(:_railtie) }
klass.helpers_path = namespace._railtie.config.paths.app.helpers.to_a
else
klass.helpers_path = app.config.helpers_paths
end
klass.helper :all
end
end
end
end
end
end