diff options
author | Felipe Artur <felipefac@gmail.com> | 2018-02-19 22:06:16 +0300 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2018-03-03 18:56:17 +0300 |
commit | dd071c4b6e9754a0abeec45ab2040d9e2d5a62b8 (patch) | |
tree | 9dda99bb987378cb6cbc95d236757d11f21176a6 /config/routes/group.rb | |
parent | 98fecb5f8e64c4c64c96d065bc342d986140367e (diff) |
Bring one group board to CE
Diffstat (limited to 'config/routes/group.rb')
-rw-r--r-- | config/routes/group.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/config/routes/group.rb b/config/routes/group.rb index 7a4740a4df7..612929dba09 100644 --- a/config/routes/group.rb +++ b/config/routes/group.rb @@ -56,6 +56,17 @@ constraints(GroupUrlConstrainer.new) do get ":secret/:filename", action: :show, as: :show, constraints: { filename: %r{[^/]+} } end end + + # On CE only index and show actions are needed + resources :boards, only: [:index, :show] + + legacy_ee_group_boards_redirect = redirect do |params, request| + path = "/groups/#{params[:group_id]}/-/boards" + path << "/#{params[:extra_params]}" if params[:extra_params].present? + path << "?#{request.query_string}" if request.query_string.present? + path + end + get 'boards(/*extra_params)', as: :legacy_ee_group_boards_redirect, to: legacy_ee_group_boards_redirect end scope(path: '*id', |