Permalink
Browse files

Improve examples: use each instead of for...in

  • Loading branch information...
1 parent e851e9e commit de6660b5ec4aa8c0e2415f3483aa9346ef8c9223 Gabe Berke-Williams committed Sep 1, 2011
Showing with 2 additions and 2 deletions.
  1. +1 −1 actionpack/lib/action_view/base.rb
  2. +1 −1 activerecord/lib/active_record/fixtures.rb
@@ -116,7 +116,7 @@ module ActionView #:nodoc:
# xml.language "en-us"
# xml.ttl "40"
#
- # for item in @recent_items
+ # @recent_items.each do |item|
# xml.item do
# xml.title(item_title(item))
# xml.description(item_description(item)) if item_description(item)
@@ -126,7 +126,7 @@ class FixturesFileNotFound < StandardError; end
# Some times you don't care about the content of the fixtures as much as you care about the volume. In these cases, you can
# mix ERB in with your YAML fixtures to create a bunch of fixtures for load testing, like:
#
-# <% for i in 1..1000 %>
+# <% (1..1000).each do |i| %>
# fix_<%= i %>:
# id: <%= i %>
# name: guy_<%= 1 %>

0 comments on commit de6660b

Please sign in to comment.