Browse files

Changed guide to use random_element.

  • Loading branch information...
rizwanreza committed May 16, 2010
1 parent 5de2e0d commit 4679b72cba371eee30cb77d9077a0bb8727a0654
Showing with 2 additions and 2 deletions.
  1. +2 −2 railties/guides/source/active_support_core_extensions.textile
@@ -1894,10 +1894,10 @@ Similarly, +from+ returns the tail from the element at the passed index on:
The methods +second+, +third+, +fourth+, and +fifth+ return the corresponding element (+first+ is builtin). Thanks to social wisdom and positive constructiveness all around, +forty_two+ is also available.
-You can pick a random element with +rand+:
+You can pick a random element with +random_element+:
-shape_type = [Circle, Square, Triangle].rand
+shape_type = [Circle, Square, Triangle].random_element
NOTE: Defined in +active_support/core_ext/array/access.rb+.

0 comments on commit 4679b72

Please sign in to comment.