【发布时间】:2014-11-08 10:06:01
【问题描述】:
我命名了我的子域,现在我正在尝试为该子域加载自定义布局。如果不在我的app/controllers/student/base_controller.rb 中使用它,我怎么能做到这一点:
class Student::BaseController < ApplicationController
layout 'student'
end
我试图将我的 application.html.erb 文件复制到 app/views/student/layouts 中,但我读过它不起作用,所以我将它复制到 app/views/layouts/student/ 中,但它仍然不起作用。我做错了什么?
谢谢大家!
【问题讨论】:
标签: ruby-on-rails ruby-on-rails-4 namespaces subdomain