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

Version Path
finapps-2.2.22 lib/finapps/utils/query_builder.rb
finapps-2.2.21 lib/finapps/utils/query_builder.rb
finapps-2.2.20 lib/finapps/utils/query_builder.rb
finapps-2.2.19 lib/finapps/utils/query_builder.rb
finapps-2.2.18 lib/finapps/utils/query_builder.rb
finapps-2.2.17 lib/finapps/utils/query_builder.rb
finapps-2.2.16 lib/finapps/utils/query_builder.rb
finapps-2.2.15 lib/finapps/utils/query_builder.rb
finapps-2.2.14 lib/finapps/utils/query_builder.rb