【发布时间】:2017-10-15 09:07:57
【问题描述】:
在 Rails 5.0.1 应用程序中,我有文件 app/actions/frontend/cart/get_cart_items_summarized.rb:
module Actions
module Frontend
module Cart
class GetCartItemsSummarized
#content here
end
end
end
end
在 app/helpers/application_helper.rb 我称之为:
def get_cart_items
#...
items = Actions::Frontend::Cart::GetCartItemsSummarized.new.call
#...
end
但我得到:
未初始化的常量 ApplicationHelper::Actions
为什么?我应该如何使用这个类?
谢谢
【问题讨论】:
标签: ruby-on-rails ruby include autoload