Currently, when this gems was bundled to an app, bundler requires lib/active_link_to/active_link_to.rb, then it immediately loads ActionView::Base at the bottom of the file. Hence, the application always loads the whole Action View library and all of its related gems even when not actually using any of view components (e.g. running rails r, running test/models/*, etc.)
The attached patch improves this situation by using Action View's handy hook for monkey-patchers, which enables us to postpone the monkey-patch loading until someone actually requires AV/base.
Currently, when this gems was bundled to an app, bundler requires lib/active_link_to/active_link_to.rb, then it immediately loads ActionView::Base at the bottom of the file. Hence, the application always loads the whole Action View library and all of its related gems even when not actually using any of view components (e.g. running
rails r
, running test/models/*, etc.)The attached patch improves this situation by using Action View's handy hook for monkey-patchers, which enables us to postpone the monkey-patch loading until someone actually requires AV/base.