debian-mirror-gitlab/app/helpers/explore_helper.rb
2016-09-13 17:45:13 +05:30

20 lines
457 B
Ruby

module ExploreHelper
def filter_projects_path(options = {})
exist_opts = {
sort: params[:sort],
scope: params[:scope],
group: params[:group],
tag: params[:tag],
visibility_level: params[:visibility_level],
}
options = exist_opts.merge(options)
path = request.path
path << "?#{options.to_param}"
path
end
def explore_controller?
controller.class.name.split("::").first == "Explore"
end
end