Skip to content

Commit

Permalink
Document hiding Dashboards in a How To section (thoughtbot#1781)
Browse files Browse the repository at this point in the history
Begins the changes for thoughtbot#1778

Closes thoughtbot#1587

Co-authored-by: Tino <tino@klassapp.com>
  • Loading branch information
tzoro and Tino authored Oct 5, 2020
1 parent c032249 commit a03a450
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions docs/how_to.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
title: How To
---

## Hiding Dashboards from the Sidebar

Resource can be removed form the sidebar by removing their index action from the routes. For example:

```ruby
# config/routes.rb
Rails.application.routes.draw do
namespace :admin do
resources :line_items, except: :index
resources :orders
resources :products
root to: "customers#index"
end
end
```

In this case, only Orders and Products will appear in the sidebar, while Line Items can still appear as an association.

0 comments on commit a03a450

Please sign in to comment.