debian-mirror-gitlab/app/helpers/explore_helper.rb
2016-06-02 11:05:42 +05:30

20 lines
455 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