Ruby从我的代码中获取了错误的类名

时间:2016-10-13 11:30:15

标签: ruby-on-rails ruby activeadmin draper

奇怪的错误,我正在调用ProceduresDecorator,但由于某些原因,我的登台服务器上的ruby想要调用NameError: uninitialized constant #<Class:0x00555f1ea188d0>::ProceduresDecorator Did you mean? Facility::ProcedureDecorator File "/app/app/admin/facility.rb" line 32 in edit def edit @facility = Facility.includes([:documents, :procedures]).find(params[:id]) @facility_documents = @facility.documents @possible_document_kinds = FacilityDocument.kinds.map { |k, _| [k.humanize, k] } @facility_procedures = ::Facility::ProcedureDecorator .decorate_collection(@facility.procedures) # line 32 @facility_info = ::Facility::InfoDecorator.decorate(@facility.info) @possible_procedures = @facility_procedures.map { |procedure| [procedure.name, procedure.id] } @templates = @facility.emergency_event_templates @white_label = @facility.white_label end 。有什么想法发生了什么?

以下是一些示例:

config/environments/staging.rb

编辑: 谢谢大家的帮助,最后问题在config.cache_classes = true config.eager_load = true 之内,这两行引起了问题。

if($('.justified-gallery').length>0){
$('head').append("<meta property='og:image' content='http://myurl.at"+$(".justified-gallery a:first-of-type").attr("href")+"' />");

0 个答案:

没有答案