Colin Law wrote in post #1064039: > On 11 June 2012 14:58, Jamal Soueidan <li...@ruby-forum.com> wrote: >> locations/location.html.erb >> >> <li><%=location.name%> >> <%=location.name%><%=location.name%><%=location.name%></li> >> >> name attribute only outputs one time?? > > To work out what is going on in these situations it is often worth > while to fiddle with what you have and see what happens. For example > what if you try > <li>A <%=location.name%> B > <%=location.name%> C <%=location.name%> D <%=location.name%> E</li> > > Also look at the generated html (View > Page Source or similar in the > browser) to see what is there. > > Colin
Colin, I already tried that It's only outputting A and nothing else. but if I change to. <% @locations.each do |location| %> <li>A <%=location.name%> B <%=location.name%> C <%=location.name%> D <%=location.name%> E</li> <% end %> it works. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.