2021-02-03 21:09:17 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-10-05 12:21:27 +00:00
|
|
|
namespace :explore do
|
|
|
|
resources :projects, only: [:index] do
|
|
|
|
collection do
|
|
|
|
get :trending
|
|
|
|
get :starred
|
2021-11-04 09:12:56 +00:00
|
|
|
get :topics
|
2021-11-02 18:12:13 +00:00
|
|
|
get 'topics/:topic_name', action: :topic, as: :topic, constraints: { topic_name: /.+/ }
|
2016-10-05 12:21:27 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
resources :groups, only: [:index]
|
|
|
|
resources :snippets, only: [:index]
|
2020-01-31 21:08:52 +00:00
|
|
|
root to: 'projects#index'
|
2016-10-05 12:21:27 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
# Compatibility with old routing
|
|
|
|
get 'public' => 'explore/projects#index'
|
|
|
|
get 'public/projects' => 'explore/projects#index'
|