New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include module in engine's application contorller causes circular dependency error #19079
Comments
BTW none of the methods defined in WfHelper was there for quotes controller. I am wondering if it has something to do with this circular dependency error. |
Let's test this a bit. Can you try defining your engines' application controller as Likewise fully qualifying the include as |
And 2. fully qualifying the include as include ::BizWorkflowx::WfHelper
|
Can you reproduce the error in a sample application? |
I can try later. I am working on engine upgrading to rails 4.2.0 with an issue I am trying to solve for last a few days. |
This issue has been automatically marked as stale because it has not been commented on for at least The resources of the Rails team are limited, and so we are asking for your help. If you can still reproduce this error on the Thank you for all your contributions. |
This issue has been automatically closed because of inactivity. If you can still reproduce this error on the Thank you for all your contributions. |
in_quotex is a Rails 4.2.0 engine. In its application controller, there includes:
module InQuotex
class ApplicationController < ::ApplicationController
include BizWorkflowx::WfHelper
.....
end
When loading the WfHelper module, there is an error if we run InQuotex::QuotexController.public_instance_methods:
InQuotex::QuotesController.public_instance_methods(false) = {RuntimeError}Circular dependency detected while autoloading constant InQuotex::QuotesController
The error above disappears (return empty array) if the include is moved into quotes controller from engine's application controller. The same code does not cause any error in Rails 3.2.12.
The text was updated successfully, but these errors were encountered: