Permalink
Browse files

Add documentation about `ActiveSupport.on_load`

[ci skip]

This commit adds some docs that explain how `LazyLoadHooks.on_load` method
works.
  • Loading branch information...
mrageh committed Jul 16, 2016
1 parent b2ab8b7 commit 3bbd2d4dff4babd1b4babdb47429630024cb1b00
Showing with 2 additions and 0 deletions.
  1. +2 −0 activesupport/lib/active_support/lazy_load_hooks.rb
@@ -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)

0 comments on commit 3bbd2d4

Please sign in to comment.