--- title: Adding Controllers without a related Model --- # Adding Controllers without a related Model Sometimes you may want to add a custom controller that has no resource related to it (for example for a statistics page). To do that, you must define an `index` route, as only controllers with index routes are displayed in the sidebar and then add a custom dashboard: ```erb # app/views/admin/stats/index.html.erb
Total Customers: <%= @stats[:customer_count] %>
Total Orders: <%= @stats[:order_count] %>