我在host.licenseUrl = 'license URL'
...
host.updateLicenseRequestInfo = function(requestInfo) {
requestInfo.headers = {
'X-TOKEN': this.token_,
};
requestInfo.withCredentials = true;
};
App
app/models/administration/app.rb
位于class App < ActiveRecord::Base
#...
end
App::Type
app/models/administration/app/type.rb
我的应用程序配置为从class App
class Type
attr_reader :sym, :name
ALL = [:type1, :type2]
#...
end
end
目录
app/models/administration
当我尝试从rails控制台访问config.autoload_paths += %W(#...
#{config.root}/app/models/administration)
时,出现以下错误
App::Type::ALL
NameError:未初始化的常量ActiveRecord :: Type :: ALL
为什么pry(main)> App::Type::ALL
和App::Type::ALL
之间存在混淆,我该如何解决?