Sha256: ceb4caf67b4507bedc6018753e63f5e25212dbd8673df5553616bb80c17227b8

Contents?: true

Size: 377 Bytes

Versions: 53

Compression:

Stored size: 377 Bytes

Contents

# ActiveSupport 3.0 doesn't URL-encode paths with arrays as params properly.
# Backported from ActiveSupport > 3.0
if ActiveSupport::VERSION::MAJOR == 3 && ActiveSupport::VERSION::MINOR == 0
  class Object
    def to_query(key)
      require 'cgi' unless defined?(CGI) && defined?(CGI::escape)
      "#{CGI.escape(key.to_param)}=#{CGI.escape(to_param.to_s)}"
    end
  end
end

Version data entries

53 entries across 53 versions & 2 rubygems

Version Path
shopify_api-6.0.0 lib/active_resource/to_query.rb
shopify_api-5.2.4 lib/active_resource/to_query.rb
shopify_api-5.2.3 lib/active_resource/to_query.rb
shopify_api-5.2.2 lib/active_resource/to_query.rb
shopify_api-5.2.1 lib/active_resource/to_query.rb
shopify_api-5.2.0 lib/active_resource/to_query.rb
shopify_api-5.1.0 lib/active_resource/to_query.rb
shopify_api-5.0.0 lib/active_resource/to_query.rb
spiffy_stores_api-4.11.1 lib/active_resource/to_query.rb
shopify_api-4.13.0 lib/active_resource/to_query.rb
shopify_api-4.12.0 lib/active_resource/to_query.rb
spiffy_stores_api-4.11.0 lib/active_resource/to_query.rb
shopify_api-4.11.0 lib/active_resource/to_query.rb
shopify_api-4.10.0 lib/active_resource/to_query.rb
shopify_api-4.9.1 lib/active_resource/to_query.rb
shopify_api-4.9.0 lib/active_resource/to_query.rb
shopify_api-4.8.0 lib/active_resource/to_query.rb
shopify_api-4.7.1 lib/active_resource/to_query.rb
shopify_api-4.7.0 lib/active_resource/to_query.rb
shopify_api-4.6.0 lib/active_resource/to_query.rb