What's the best wait for a plugin to autoload

Let’s say I have a plugin for for ActionController. I only want the
plugin loaded if ActionController is loaded.

Rails has put a lot of effort into autoloading only the necessary
files during startup. Is there a good way for the ActionController
plugin to load only when the ActionController module is loaded?

For example, most plugins would do the following:

ActionController.class_eval do
include UberControllerPlugin

The above lines cause all of ActionController to be loaded for all
tests and server startups. Is there a way to “autoload” the plugin
only after the ActionController module has been referenced?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs