diff options
author | Vijay Dev <vijaydev.cse@gmail.com> | 2012-08-04 15:18:35 +0530 |
---|---|---|
committer | Vijay Dev <vijaydev.cse@gmail.com> | 2012-08-04 15:18:35 +0530 |
commit | 3d3fa165e40c8cdaaebdab9dd2985d0ca3a36236 (patch) | |
tree | 21ae9b984d34c9487628097f3933f8fa14a3558f /activesupport | |
parent | c963f883a41913624363bfd8203b5640318198c2 (diff) | |
parent | b51201242aaf77c6db5a9b2f72e433c521df79c5 (diff) | |
download | rails-3d3fa165e40c8cdaaebdab9dd2985d0ca3a36236.tar.gz rails-3d3fa165e40c8cdaaebdab9dd2985d0ca3a36236.tar.bz2 rails-3d3fa165e40c8cdaaebdab9dd2985d0ca3a36236.zip |
Merge branch 'master' of github.com:lifo/docrails
Conflicts:
activemodel/lib/active_model/secure_password.rb
activerecord/lib/active_record/associations/collection_proxy.rb
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/core_ext/object/to_param.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/core_ext/object/to_param.rb b/activesupport/lib/active_support/core_ext/object/to_param.rb index e5f81078ee..0d5f3501e5 100644 --- a/activesupport/lib/active_support/core_ext/object/to_param.rb +++ b/activesupport/lib/active_support/core_ext/object/to_param.rb @@ -6,18 +6,21 @@ class Object end class NilClass + # Returns +self+. def to_param self end end class TrueClass + # Returns +self+. def to_param self end end class FalseClass + # Returns +self+. def to_param self end @@ -35,12 +38,12 @@ class Hash # Returns a string representation of the receiver suitable for use as a URL # query string: # - # {:name => 'David', :nationality => 'Danish'}.to_param + # {name: 'David', nationality: 'Danish'}.to_param # # => "name=David&nationality=Danish" # # An optional namespace can be passed to enclose the param names: # - # {:name => 'David', :nationality => 'Danish'}.to_param('user') + # {name: 'David', nationality: 'Danish'}.to_param('user') # # => "user[name]=David&user[nationality]=Danish" # # The string pairs "key=value" that conform the query string |