Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-03-04 18:42:37 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-03-04 21:26:10 +0300
commitbebf34aa47235899b54c54995a8b6a13534f2eab (patch)
tree5546d0cc849a5157f9f4b66ddbc47535884d9beb /app/helpers/explore_helper.rb
parentacb211215c30244612eae6219539ced4a071b0dc (diff)
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.rb12
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