debian-mirror-gitlab/app/helpers/explore_helper.rb

21 lines
457 B
Ruby
Raw Normal View History

2015-04-26 12:48:37 +05:30
module ExploreHelper
2016-09-13 17:45:13 +05:30
def filter_projects_path(options = {})
2015-04-26 12:48:37 +05:30
exist_opts = {
sort: params[:sort],
scope: params[:scope],
group: params[:group],
tag: params[:tag],
visibility_level: params[:visibility_level],
}
options = exist_opts.merge(options)
2016-06-02 11:05:42 +05:30
path = request.path
2015-04-26 12:48:37 +05:30
path << "?#{options.to_param}"
path
end
2016-04-02 18:10:28 +05:30
def explore_controller?
controller.class.name.split("::").first == "Explore"
end
2015-04-26 12:48:37 +05:30
end