Sha256: 5fc9ac5d239db99a647691bfdf15021c265f1ce56adf7b26464448718d2ccdd2
Contents?: true
Size: 531 Bytes
Versions: 3
Compression:
Stored size: 531 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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
finapps-2.3.3 | lib/finapps/utils/query_builder.rb |
finapps-2.3.2 | lib/finapps/utils/query_builder.rb |
finapps-2.3.1 | lib/finapps/utils/query_builder.rb |