2015-03-10 18:59:14 -04:00
|
|
|
module ExploreHelper
|
2016-08-05 22:03:01 -04:00
|
|
|
def filter_projects_path(options = {})
|
2015-03-10 18:59:14 -04:00
|
|
|
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-03-04 10:42:37 -05:00
|
|
|
path = request.path
|
2015-03-10 18:59:14 -04:00
|
|
|
path << "?#{options.to_param}"
|
|
|
|
path
|
|
|
|
end
|
2016-02-03 14:13:26 -05:00
|
|
|
|
|
|
|
def explore_controller?
|
|
|
|
controller.class.name.split("::").first == "Explore"
|
|
|
|
end
|
2015-03-10 18:59:14 -04:00
|
|
|
end
|