Skip to content

Cherry-picking patch for https://github.com/rails/rails/issues/1460 from 3-1-stable to master #1733

Merged
merged 1 commit into from Jun 16, 2011

2 participants

@jhtwong
jhtwong commented Jun 16, 2011

[3.1.0.rc1] Plugins inside engines not eager-loaded properly and their
rake tasks ignored

Working with the new support for plugins inside engines in Rails 3.1,
I found that certain things that work for regular plugins don't work
for these new nested plugins. In particular, these methods in
Rails::Engine don't seem to understand that an engine could have
nested plugins:

#load_tasks
#load_generators
#load_console
#eager_load!

A solution which worked out for me is to move the calls to
railties.all { ... } from the overriding methods in Rails::Application
into Rails::Engine.

@jhtwong jhtwong Cherry-picking patch for rails#1460
from 3-1-stable to master

[3.1.0.rc1] Plugins inside engines not eager-loaded properly and their
rake tasks ignored

Working with the new support for plugins inside engines in Rails 3.1,
I found that certain things that work for regular plugins don't work
for these new nested plugins. In particular, these methods in
Rails::Engine don't seem to understand that an engine could have
nested plugins:

#load_tasks
#load_generators
#load_console
#eager_load!

A solution which worked out for me is to move the calls to
railties.all { ... } from the overriding methods in Rails::Application
into Rails::Engine.
245dba0
@josevalim josevalim merged commit b9fa32c into rails:master Jun 16, 2011
@jhtwong
jhtwong commented Jun 16, 2011

Thanks @josevalim for taking this patch. How about issue #1458 which is related?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.