使用Ruby:2.3.1p112
和Rails:3.2.12
未初始化的不斷聯繫::管理
我想呼籲在我的控制器演示方法。所以,在我_form.html.erb
我:
<%= link_to 'Demo', "/admin/clinics/"[email protected]_s+"/demo" %>
在我routes.rb
:
match "/admin" => "admin#index", :as => :admin
namespace :admin do
resources :admin_users
resources :health_plan_tables
resources :health_aid_tables
resources :clients
resources :clinics
resources :specialties
resources :qualifications
resources :profissionals
resources :addresses
resources :documents
resources :banners
root :to => 'banners#index'
get 'logout' => 'devise/sessions#destroy'
get 'clinics/:id/demo', to: 'admin/clinics#demo', as: 'demo'
end
我clinics_controller.rb
是文件夾controllers/admin
裏面,我只是有:
def demo
print "hello"
end
所以,當我點擊鏈接,出現錯誤信息Uninitialized constant Admin::Admin
。 任何ideia如何解決它?
你可以發佈完整的錯誤stacktrace? – Pavan
在這裏男人:[鏈接](https://uploaddeimagens.com.br/imagens/image-png--479) –