diff --git a/config/routes.rb b/config/routes.rb index 88ada94..9ccfe9a 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -4,12 +4,14 @@ get 'ics/:key' => 'ics#show', as: :ics - get 'dashboard/:ecampus_id' => 'dashboard#index', as: :dashboard - get 'dashboard/:ecampus_id/courses' => 'dashboard#courses', as: :dashboard_courses - get 'dashboard/:ecampus_id/grades/:year/:try' => 'dashboard#grades', as: :dashboard_grades - put 'dashboard/:ecampus_id/grades/:year/:try' => 'dashboard#update_grades' - get 'dashboard/:ecampus_id/absences/:year/:try' => 'dashboard#absences', as: :dashboard_absences - put 'dashboard/:ecampus_id/absences/:year/:try' => 'dashboard#update_absences' + scope '/dashboard/:ecampus_id' do + get '' => 'dashboard#index', as: :dashboard + get 'courses' => 'dashboard#courses', as: :dashboard_courses + get 'grades/:year/:try' => 'dashboard#grades', as: :dashboard_grades + put 'grades/:year/:try' => 'dashboard#update_grades' + get 'absences/:year/:try' => 'dashboard#absences', as: :dashboard_absences + put 'absences/:year/:try' => 'dashboard#update_absences' + end resource :sessions, only: [:destroy] # Should be improved