diff options
author | Gabe Berke-Williams <gabe@thoughtbot.com> | 2011-08-31 20:52:35 -0400 |
---|---|---|
committer | Gabe Berke-Williams <gabe@thoughtbot.com> | 2011-08-31 20:52:35 -0400 |
commit | de6660b5ec4aa8c0e2415f3483aa9346ef8c9223 (patch) | |
tree | 4ff021d568639bb4172890911b6939442f670aff | |
parent | e851e9e407c38e5026835471b7440ab7f2947490 (diff) | |
download | rails-de6660b5ec4aa8c0e2415f3483aa9346ef8c9223.tar.gz rails-de6660b5ec4aa8c0e2415f3483aa9346ef8c9223.tar.bz2 rails-de6660b5ec4aa8c0e2415f3483aa9346ef8c9223.zip |
Improve examples: use each instead of for...in
-rw-r--r-- | actionpack/lib/action_view/base.rb | 2 | ||||
-rw-r--r-- | activerecord/lib/active_record/fixtures.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/base.rb b/actionpack/lib/action_view/base.rb index 43d67f2032..36c49d9c91 100644 --- a/actionpack/lib/action_view/base.rb +++ b/actionpack/lib/action_view/base.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) diff --git a/activerecord/lib/active_record/fixtures.rb b/activerecord/lib/active_record/fixtures.rb index 3f36dcde14..2674430116 100644 --- a/activerecord/lib/active_record/fixtures.rb +++ b/activerecord/lib/active_record/fixtures.rb @@ -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 %> |