Sha256: 9b006ae3faad149daabd815f7e13812092f3cd624592e4b36014cd0764f4a9e2

Contents?: true

Size: 397 Bytes

Versions: 60

Compression:

Stored size: 397 Bytes

Contents

class Object
  # Alias of <tt>to_s</tt>.
  def to_param
    to_s
  end

  # Converts an object into a string suitable for use as a URL query string, using the given <tt>key</tt> as the
  # param name.
  #
  # Note: This method is defined as a default implementation for all Objects for Hash#to_query to work.
  def to_query(key)
    "#{CGI.escape(key.to_s)}=#{CGI.escape(to_param.to_s)}"
  end
end

Version data entries

60 entries across 59 versions & 16 rubygems

Version Path
3mix-castronaut-0.5.0.2 vendor/activesupport/lib/active_support/core_ext/object/conversions.rb
masover-castronaut-0.4.4.4 vendor/activesupport/lib/active_support/core_ext/object/conversions.rb
masover-castronaut-0.4.4.5 vendor/activesupport/lib/active_support/core_ext/object/conversions.rb
masover-castronaut-0.5.0.1 vendor/activesupport/lib/active_support/core_ext/object/conversions.rb
p8-castronaut-0.6.1.1 vendor/activesupport/lib/active_support/core_ext/object/conversions.rb
relevance-castronaut-0.4.1 vendor/activesupport/lib/active_support/core_ext/object/conversions.rb
relevance-castronaut-0.4.2 vendor/activesupport/lib/active_support/core_ext/object/conversions.rb
relevance-castronaut-0.4.3 vendor/activesupport/lib/active_support/core_ext/object/conversions.rb
relevance-castronaut-0.4.4 vendor/activesupport/lib/active_support/core_ext/object/conversions.rb
relevance-castronaut-0.4.5 vendor/activesupport/lib/active_support/core_ext/object/conversions.rb
relevance-castronaut-0.4.6 vendor/activesupport/lib/active_support/core_ext/object/conversions.rb
relevance-castronaut-0.5.0 vendor/activesupport/lib/active_support/core_ext/object/conversions.rb
relevance-castronaut-0.5.1 vendor/activesupport/lib/active_support/core_ext/object/conversions.rb
relevance-castronaut-0.5.2 vendor/activesupport/lib/active_support/core_ext/object/conversions.rb
relevance-castronaut-0.5.3 vendor/activesupport/lib/active_support/core_ext/object/conversions.rb
relevance-castronaut-0.5.4 vendor/activesupport/lib/active_support/core_ext/object/conversions.rb
relevance-castronaut-0.6.0 vendor/activesupport/lib/active_support/core_ext/object/conversions.rb
relevance-castronaut-0.6.1 vendor/activesupport/lib/active_support/core_ext/object/conversions.rb
relevance-castronaut-0.7.4 vendor/activesupport/lib/active_support/core_ext/object/conversions.rb
relevance-castronaut-0.7.5 vendor/activesupport/lib/active_support/core_ext/object/conversions.rb