We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Create a new app/admin/dashboard_admin.rb file and add the following contents:
app/admin/dashboard_admin.rb
Trestle.admin(:dashboard) do menu do item :dashboard, icon: "fa fa-tachometer" end controller do def index @missing_warhead_count = Warhead.missing.count end end end
Note that we are configuring a Trestle.admin and not a Trestle.resource.
Trestle.admin
Trestle.resource
Then add a view to support it at app/views/admin/dashboard/index.html.haml:
app/views/admin/dashboard/index.html.haml
- content_for(:title, 'Dashboard') = render "header" .main-content-area .main-content-container .main-content %h3= pluralize(@missing_warhead_count,'Missing Warhead')