提交 7dbf5c82 编写于 作者: C Carl Lerche

Tweak how ActionPack handles InheritableOptions

上级 15b3b746
require 'active_support/ordered_options'
module AbstractController module AbstractController
class Error < StandardError; end class Error < StandardError; end
class ActionNotFound < StandardError; end class ActionNotFound < StandardError; end
......
require 'active_support/core_ext/class/attribute' require 'active_support/core_ext/class/attribute'
require 'active_support/ordered_options'
module ActionController module ActionController
# ActionController::Metal provides a way to get a valid Rack application from a controller. # ActionController::Metal provides a way to get a valid Rack application from a controller.
......
...@@ -297,7 +297,7 @@ def initialize(view_paths = [], assigns_for_first_render = {}, controller = nil, ...@@ -297,7 +297,7 @@ def initialize(view_paths = [], assigns_for_first_render = {}, controller = nil,
@helpers = self.class.helpers || Module.new @helpers = self.class.helpers || Module.new
@_controller = controller @_controller = controller
@_config = controller.config if controller @_config = ActiveSupport::InheritableOptions.new(controller.config) if controller
@_content_for = Hash.new {|h,k| h[k] = ActiveSupport::SafeBuffer.new } @_content_for = Hash.new {|h,k| h[k] = ActiveSupport::SafeBuffer.new }
@_virtual_path = nil @_virtual_path = nil
self.view_paths = view_paths self.view_paths = view_paths
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册