aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorChandresh Pant <cp@cpant.in>2013-06-17 13:51:59 +0530
committerChandresh Pant <cp@cpant.in>2013-06-17 13:51:59 +0530
commit6946fffd6362bbb3447c1fbc4d8e155f9ced5f4f (patch)
tree72bd6ba97b8897e29129e87022ef481e22e74654 /guides
parentebc7531a0ab301976cc86282652394fa01ba7b48 (diff)
downloadrails-6946fffd6362bbb3447c1fbc4d8e155f9ced5f4f.tar.gz
rails-6946fffd6362bbb3447c1fbc4d8e155f9ced5f4f.tar.bz2
rails-6946fffd6362bbb3447c1fbc4d8e155f9ced5f4f.zip
rewrote render tag using more succinct and idiomatic way
Diffstat (limited to 'guides')
-rw-r--r--guides/source/working_with_javascript_in_rails.md4
1 files changed, 1 insertions, 3 deletions
diff --git a/guides/source/working_with_javascript_in_rails.md b/guides/source/working_with_javascript_in_rails.md
index 22a59cdfec..bd0c796673 100644
--- a/guides/source/working_with_javascript_in_rails.md
+++ b/guides/source/working_with_javascript_in_rails.md
@@ -278,9 +278,7 @@ The index view (`app/views/users/index.html.erb`) contains:
<b>Users</b>
<ul id="users">
-<% @users.each do |user| %>
- <%= render user %>
-<% end %>
+<%= render @users %>
</ul>
<br>