提交 afdc2bcc 编写于 作者: R Rafael França 提交者: GitHub

Merge pull request #25856 from mrageh/improve-lazy-load-hook-docs

Add documentation about `ActiveSupport.on_load`
......@@ -28,6 +28,8 @@ def self.extended(base) # :nodoc:
end
end
# Declares a block that will be executed when a Rails component is fully
# loaded.
def on_load(name, options = {}, &block)
@loaded[name].each do |base|
execute_hook(base, options, block)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册