我继承了一个使用 COMFY CMS 的项目。到目前为止,我还没有使用此 CMS 的经验。我必须在管理区域中创建一个页面 - 就在站点、布局、页面、片段、文件等下方。
我阅读了https://github.com/comfy/comfortable-mexican-sofa/wiki/HowTo:-Reusing-Admin-Area,但没有帮助。
我创建了控制器(app/controllers/admin/server_management_controller.rb)和视图(/app/views/comfy/admin/emails/index.html.haml)。
控制器:
class Admin::ServerManagementController < Comfy::Admin::Cms::BaseController
def index
end
end
风景:
.page-header
%h2= 'Index'
以及对应的路线:
namespace :admin do
get ' ' => 'server_management#index', as: :server_management
当我导航到该页面时,出现错误:
Admin::ServerManagementController#index 缺少此请求格式和变体的模板。
请帮忙