summaryrefslogtreecommitdiff
path: root/app/helpers/explore_helper.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2017-03-01 15:31:56 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2017-03-01 15:39:59 +0200
commitb7c30cae4eedab5e8e41d9764ac08ca12361d054 (patch)
treee5a594dfd920a55a52a00b34e632dfb553de4c45 /app/helpers/explore_helper.rb
parent11dd2348c410949c98adfc10cdcf5be787742179 (diff)
downloadgitlab-ce-b7c30cae4eedab5e8e41d9764ac08ca12361d054.tar.gz
Add filter and sorting to dashboard groups page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/helpers/explore_helper.rb')
-rw-r--r--app/helpers/explore_helper.rb14
1 files changed, 11 insertions, 3 deletions
diff --git a/app/helpers/explore_helper.rb b/app/helpers/explore_helper.rb
index 2b1f3825adc..bbcb52f7eaf 100644
--- a/app/helpers/explore_helper.rb
+++ b/app/helpers/explore_helper.rb
@@ -9,12 +9,20 @@ module ExploreHelper
}
options = exist_opts.merge(options)
- path = request.path
- path << "?#{options.to_param}"
- path
+ request_path_with_options(options)
+ end
+
+ def filter_groups_path(options = {})
+ request_path_with_options(options)
end
def explore_controller?
controller.class.name.split("::").first == "Explore"
end
+
+ private
+
+ def request_path_with_options(options = {})
+ request.path + "?#{options.to_param}"
+ end
end