On 11 June 2012 14:58, Jamal Soueidan <
li...@ruby-forum.com> wrote:
> Hello,
>
> I'm facing very simple weird error.
>
> in my main page main.html.erb
>
> <%=render(@locations) %>
>
> and in I try to output name twice
>
> 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