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