Ruby on rails Rails 3.1:视图未在命名空间布局中呈现

Ruby on rails Rails 3.1:视图未在命名空间布局中呈现,ruby-on-rails,layout,namespaces,views,rendering,Ruby On Rails,Layout,Namespaces,Views,Rendering,在routes.rb中: namespace :admin do root :controller => "base", :action => "index" resources :products end 产品控制器从基本控制器继承: class Admin::BaseController < ApplicationController #layout 'admin' def index end end class Admin::Prod

在routes.rb中:

namespace :admin do
    root :controller => "base", :action => "index"
    resources :products
end
产品控制器从基本控制器继承:

class Admin::BaseController < ApplicationController
   #layout 'admin'
   def index
   end
end

class Admin::ProductsController < Admin::BaseController
   def index
   end
end

可能会有帮助,mate

可能会有帮助,mate

当我这样做的时候,我几乎总是忘记之前的收益率通知或=号。你有吗?当我有这个的时候,我几乎总是忘记之前的收益率通知或=号。你有这个吗?+1这个:哈哈,我读了几分钟后笑了+1为此:D哈哈,我读了几分钟后笑了几分钟;
Rendered admin/products/index.html.erb within layouts/admin