BigW Consortium Gitlab

explore_helper.rb 457 Bytes
Newer Older
1
module ExploreHelper
2
  def filter_projects_path(options = {})
3 4 5 6 7 8 9 10 11
    exist_opts = {
      sort: params[:sort],
      scope: params[:scope],
      group: params[:group],
      tag: params[:tag],
      visibility_level: params[:visibility_level],
    }

    options = exist_opts.merge(options)
12
    path = request.path
13 14 15
    path << "?#{options.to_param}"
    path
  end
16 17 18 19

  def explore_controller?
    controller.class.name.split("::").first == "Explore"
  end
20
end