mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
README updated for for => each
This commit is contained in:
parent
a921cab621
commit
8630cd420c
1 changed files with 3 additions and 3 deletions
|
@ -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 %>
|
||||
|
||||
|
|
Loading…
Reference in a new issue