lib/rapa/queries/base_query.rb in rapa-0.3.0 vs lib/rapa/queries/base_query.rb in rapa-0.3.1

- old
+ new

@@ -1,6 +1,6 @@ -require "cgi" +require "erb" require "time" module Rapa module Queries class BaseQuery @@ -86,20 +86,20 @@ # @return [Hash] def to_hash self.class.property_names.each_with_object({}) do |property_name, result| value = send(property_name) unless value.nil? - result[property_name.to_s] = value + result[property_name.to_s] = ::ERB::Util.url_encode(value) end end.sort.to_h end # @return [String] def to_s to_hash.map do |key, value| [ key, - ::CGI.escape(value), + value, ].join("=") end.join("&") end # @return [String]