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
mack-facets-0.8.3 lib/gems/activesupport-2.2.2/lib/active_support/core_ext/object/conversions.rb
mack-facets-0.8.3.1 lib/gems/activesupport-2.2.2/lib/active_support/core_ext/object/conversions.rb
radiant-0.6.5.1 vendor/rails/activesupport/lib/active_support/core_ext/object/conversions.rb
radiant-0.6.5 vendor/rails/activesupport/lib/active_support/core_ext/object/conversions.rb
radiant-0.6.6 vendor/rails/activesupport/lib/active_support/core_ext/object/conversions.rb
radiant-0.6.7 vendor/rails/activesupport/lib/active_support/core_ext/object/conversions.rb
radiant-0.6.9 vendor/rails/activesupport/lib/active_support/core_ext/object/conversions.rb
radiant-0.6.8 vendor/rails/activesupport/lib/active_support/core_ext/object/conversions.rb
radiant-0.7.0 vendor/rails/activesupport/lib/active_support/core_ext/object/conversions.rb
radiant-0.7.1 vendor/rails/activesupport/lib/active_support/core_ext/object/conversions.rb
spree-0.0.9 vendor/rails/activesupport/lib/active_support/core_ext/object/conversions.rb
spree-0.2.0 vendor/rails/activesupport/lib/active_support/core_ext/object/conversions.rb
swivel-0.0.149 vendor/activesupport-2.0.2-/lib/active_support/core_ext/object/conversions.rb
swivel-0.0.150 vendor/activesupport-2.0.2-/lib/active_support/core_ext/object/conversions.rb
swivel-0.0.155 vendor/activesupport-2.0.2-/lib/active_support/core_ext/object/conversions.rb
swivel-0.0.157 vendor/activesupport-2.0.2-/lib/active_support/core_ext/object/conversions.rb
swivel-0.0.156 vendor/activesupport-2.0.2-/lib/active_support/core_ext/object/conversions.rb
swivel-0.0.175 vendor/activesupport-2.0.2-/lib/active_support/core_ext/object/conversions.rb
swivel-0.0.160 vendor/activesupport-2.0.2-/lib/active_support/core_ext/object/conversions.rb
swivel-0.0.152 vendor/activesupport-2.0.2-/lib/active_support/core_ext/object/conversions.rb