Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

README updated for for => each #1135

Merged
merged 1 commit into from

3 participants

@arunagw
Collaborator

As per changes in

22ed6cb

@judearasu

Hi,
Is there any difference b/w for & each loops ?

Collaborator

Thanks for the info

@josevalim josevalim merged commit b5fec0f into rails:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 19, 2011
  1. @arunagw

    README updated for for => each

    arunagw authored
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 3 deletions.
  1. +3 −3 actionpack/README.rdoc
View
6 actionpack/README.rdoc
@@ -58,7 +58,7 @@ A short rundown of some of the major features:
* ERB templates (static content mixed with dynamic output from ruby)
- <% for post in @posts %>
+ <% @posts.each do |post| %>
Title: <%= post.title %>
<% end %>
@@ -81,7 +81,7 @@ A short rundown of some of the major features:
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))
@@ -293,7 +293,7 @@ And the templates look like this:
</body></html>
weblog/index.html.erb:
- <% for post in @posts %>
+ <% @posts.each do |post| %>
<p><%= link_to(post.title, :action => "show", :id => post.id) %></p>
<% end %>
Something went wrong with that request. Please try again.