diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-03-04 16:42:37 +0100 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-03-04 19:26:10 +0100 |
commit | bebf34aa47235899b54c54995a8b6a13534f2eab (patch) | |
tree | 5546d0cc849a5157f9f4b66ddbc47535884d9beb /app/helpers/explore_helper.rb | |
parent | acb211215c30244612eae6219539ced4a071b0dc (diff) | |
download | gitlab-ce-bebf34aa47235899b54c54995a8b6a13534f2eab.tar.gz |
Make projects sort dropdown shared so it can be reused for other pages
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/helpers/explore_helper.rb')
-rw-r--r-- | app/helpers/explore_helper.rb | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/app/helpers/explore_helper.rb b/app/helpers/explore_helper.rb index 3648757428b..337b0aacbb5 100644 --- a/app/helpers/explore_helper.rb +++ b/app/helpers/explore_helper.rb @@ -1,5 +1,5 @@ module ExploreHelper - def explore_projects_filter_path(options={}) + def filter_projects_path(options={}) exist_opts = { sort: params[:sort], scope: params[:scope], @@ -9,15 +9,7 @@ module ExploreHelper } options = exist_opts.merge(options) - - path = if explore_controller? - explore_projects_path - elsif current_action?(:starred) - starred_dashboard_projects_path - else - dashboard_projects_path - end - + path = request.path path << "?#{options.to_param}" path end |