class method
self.on_load
Ruby on Rails 3.1.12
Since v3.0.20 Last seen in v4.2.9Signature
self.on_load(name, options = {}, &block)
No documentation comment.
Parameters
-
namereq -
optionsopt = {} -
blockblock
Source
# File activesupport/lib/active_support/lazy_load_hooks.rb, line 24
def self.on_load(name, options = {}, &block)
if base = @loaded[name]
execute_hook(base, options, block)
else
@load_hooks[name] << [block, options]
end
end
Defined in activesupport/lib/active_support/lazy_load_hooks.rb line 24
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport