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
radiant-0.7.2 vendor/rails/activesupport/lib/active_support/core_ext/object/conversions.rb
vibes-bj-1.2.2 spec/rails_root/vendor/rails/activesupport/lib/active_support/core_ext/object/conversions.rb
vibes-bj-1.2.1 spec/rails_root/vendor/rails/activesupport/lib/active_support/core_ext/object/conversions.rb
nbudin-castronaut-0.7.5 vendor/activesupport/lib/active_support/core_ext/object/conversions.rb
usher-0.7.0 spec/rails2_2/vendor/rails/vendor/rails/activesupport/lib/active_support/core_ext/object/conversions.rb
usher-0.7.0 spec/rails2_2/vendor/rails/vendor/rails/activesupport/pkg/activesupport-2.2.2/lib/active_support/core_ext/object/conversions.rb
factorylabs-castronaut-0.7.5 vendor/activesupport/lib/active_support/core_ext/object/conversions.rb
activeobject-0.0.3 ./lib/active_support/core_ext/object/conversions.rb
activeobject-0.0.4 ./lib/active_support/core_ext/object/conversions.rb
activesupport-2.2.3 lib/active_support/core_ext/object/conversions.rb
activesupport-2.1.2 lib/active_support/core_ext/object/conversions.rb
activesupport-2.2.2 lib/active_support/core_ext/object/conversions.rb
activesupport-2.1.0 lib/active_support/core_ext/object/conversions.rb
activesupport-2.0.5 lib/active_support/core_ext/object/conversions.rb
activesupport-2.1.1 lib/active_support/core_ext/object/conversions.rb
activesupport-2.0.4 lib/active_support/core_ext/object/conversions.rb
activesupport-2.0.2 lib/active_support/core_ext/object/conversions.rb
antfarm-0.3.0 rails/vendor/rails/activesupport/lib/active_support/core_ext/object/conversions.rb
antfarm-0.4.0 rails/vendor/rails/activesupport/lib/active_support/core_ext/object/conversions.rb
mack-active_record-0.8.2 lib/gems/activesupport-2.2.2/lib/active_support/core_ext/object/conversions.rb