I have engine 'Core' rails and I have:
# core/app/models/core/concerns/user_helper.rb module Core module UserHelper extend ActiveSupport::Concern included do
however, it says the uninitialized persistent Core :: UserHelper . Thus, it seems that the engine does not load its problems by default, so I added it in the startup path
module Core class Engine < ::Rails::Engine config.autoload_paths += %W(
And now I am ending this error: It is not possible to automatically load the user UserHelper expected by myapp / core / app / models / core / issues / user_helper.rb to determine it
So what is wrong here? When I checked the explorer http://edgeguides.rubyonrails.org/engines.html and it had no problems in the problems directory, but rather the lib / problems had all the link to the concern about using Core :: Concerns :: MyConcern, so this is where to put problems in the engine?
thanks
Edit
Yuriβs comment explained this problem, it seems that the directory does not receive any special treatment on the problem engines, and it is considered as a regular directory under the models, so the modules in it should be in the Concerns namespace and when you enable anxiety, you should include it also in "Concerts", if I understand correctly. I am surprised that this is not mentioned in the docs.
ruby-on-rails rails-engines
Loai ghoraba
source share