Don't directly access ::Rails::Application in VersionStrategy#registered_engines #122
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
On updating to Cells 3.8.3, our Rails 3.0 app started spitting out the following deprecation message:
I traced this down to the Rail 3.0 lookup for registered engines, which talks to
Rails::Application
directly. The attached commit modifies the calls so that the app instance is passed through, and the old engines lookup can be used.It's not ready to merge, however, because I've hit a possible bug in this area. The documentation says that adding the following to an initializer will disable the view_path_engines additions:
However the
append_engines_view_paths_for
method doesn't actually look at this config setting, as far as I can see - instead, it's talking to the application'saction_controller
config hash:There's no such setting in the
action_controller
config hash, so it seems that all registered Engines are always appended to the view path.Should this check be talking to
Cell::Base.config
as per the documentation, or should it be looking elsewhere, and the documentation needs updating? If you let me know what the intention is, I'll update this pull request as necessary.Cheers,
Simon