每次我得到一个警告:
app/controllers/agency/agencies_controller.rb:1: warning: toplevel constant ApplicationController referenced by Agency::ApplicationController
我的agency_controller.rb:
class Agency::AgenciesController < Agency::ApplicationController def index ... end ... end
和Agency :: ApplicationController:
class Agency::ApplicationController < ApplicationController layout 'agency' helper_method :current_agency private def current_agency @current_agency ||= current_user.agency end end
铁轨从我想要什么?有什么麻烦?
与另一个控制器相同的情况
class Agency::ClientsController < Agency::ApplicationController ... end
没有警告,没有错误…