diff options
author | Francesco Rodriguez <lrodriguezsanc@gmail.com> | 2012-07-27 21:02:08 -0500 |
---|---|---|
committer | Francesco Rodriguez <lrodriguezsanc@gmail.com> | 2012-07-27 21:02:08 -0500 |
commit | 03404936945b452b8e66e53e183973176dae8301 (patch) | |
tree | bfb6d25f584484b61dc298642912082de35a5c40 | |
parent | 74262e654b56e8b95e8e1af46d73e3f89a8df93a (diff) | |
download | rails-03404936945b452b8e66e53e183973176dae8301.tar.gz rails-03404936945b452b8e66e53e183973176dae8301.tar.bz2 rails-03404936945b452b8e66e53e183973176dae8301.zip |
update to_param docs [ci skip]
-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 |