I made a helper for subresource URLs
module Url; end
Then
module Url
class Base
end
end
When I try to inherit from Url::Base, a occurs LoadError:
Unable to autoload constant Base, expected xxx/app/urls/base.rb to define it
I debugged it a bit, the file was loaded correctly, and the class was loaded, but the check is listened to. It seems that an error occurred in ActiveSupport::Dependencies#const_missingwhen it passed Objectas from_mod(<is a variable that should include a constant) instead Url.
Try the following:
Url::Base
Url::Base
I can’t understand why the const_missingtrigger is on Objectinstead Url... Some help? What am I doing wrong?
EDIT
, , , . Rails , namespace/class_name.rb PATH; , ( ), form_model = Object.