提交 3916f034 编写于 作者: Y Yehuda Katz

Not calling a private method anymore

上级 e57197a9
......@@ -237,8 +237,11 @@ def self.for_controller(controller)
if controller.class.respond_to?(:_helper_serial)
klass = @views[controller.class._helper_serial] ||= Class.new(self) do
name = controller.class.name.gsub(/::/, '__')
Subclasses.remove_const(name) if Subclasses.const_defined?(name)
Subclasses.const_set(name, self)
Subclasses.class_eval do
remove_const(name) if const_defined?(name)
const_set(name, self)
end
if controller.respond_to?(:_helpers)
include controller._helpers
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册