In a Ruby on Rails application I want to have this routing:
- for URL www.example.com/reports go to controller
- for URL www.example.com/charts go to controller
In the routes.rb file I currently have:
scope controller: :documents do
get 'reports' => :reports
get 'charts' => :charts
The code works as expected, but is there a way so I keep the code dry and don't repeat the action names?