Sha256: 8af59596ac843f06d9a7b36667ed4fcebef2f9710a6b5147f3028ac987dc63f7
Contents?: true
Size: 530 Bytes
Versions: 9
Compression:
Stored size: 530 Bytes
Contents
# frozen_string_literal: true module FinApps module Utils module QueryBuilder def build_query_path(root_url, params) page = params[:page] ? "page=#{params[:page]}" : '' requested = params[:requested] ? "&requested=#{params[:requested]}" : '' sort = params[:sort] ? "&sort=#{ERB::Util.url_encode(params[:sort])}" : '' filter = params[:filter] ? "&filter=#{ERB::Util.url_encode(params[:filter])}" : '' "#{root_url}?#{page}#{requested}#{sort}#{filter}" end end end end
Version data entries
9 entries across 9 versions & 1 rubygems