I inherited a project that uses COMFY CMS. I have no experience with this CMS so far. I have to create a page in the admin area - right below Sites, Layouts, Pages, Snippets, Files etc.
I read the https://github.com/comfy/comfortable-mexican-sofa/wiki/HowTo:-Reusing-Admin-Area , but it didn't help.
I created controller ( app/controllers/admin/server_management_controller.rb) and view (/app/views/comfy/admin/emails/index.html.haml).
Controller:
class Admin::ServerManagementController < Comfy::Admin::Cms::BaseController
def index
end
end
The view:
.page-header
%h2= 'Index'
And the corresponding route:
namespace :admin do
get ' ' => 'server_management#index', as: :server_management
When I navigate to that page I get error:
Admin::ServerManagementController#index is missing a template for this request format and variant.
Please help
As per that error message, your template is in the wrong spot. Rails will load templates derived from the controller class. So
Admin::ServerManagementController#indexneeds a view inapp/views/admin/server_management/index.html.haml