Forum: Ruby on Rails RE: How to render from with <%%> ?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Marcus B. (Guest)
on 2006-05-31 20:44
(Received via mailing list)
Joerg, I haven't found a good way to do what you want.  I think just
separate code blocks is the cleanest.

<%coll.each do |itm|%>
  <%=itm.value%>
<%end%>

It's ugly, but more readable (to a simpleton like me) than <% coll.each
{|itm| _erbout << itm.value } %>

Marcus
unknown (Guest)
on 2006-05-31 20:53
(Received via mailing list)
Hi --

On Wed, 31 May 2006, Marcus B. wrote:

> Joerg, I haven't found a good way to do what you want.  I think just
> separate code blocks is the cleanest.
>
> <%coll.each do |itm|%>
>  <%=itm.value%>
> <%end%>
>
> It's ugly, but more readable (to a simpleton like me) than <% coll.each
> {|itm| _erbout << itm.value } %>

Of course it is, but Joerg specifically asked for a way to do this
without using <%= %>.


David


> Hi --
>>
> or something like that, though that's really what <%= %> is for :-)
> _______________________________________________
> Rails mailing list
> removed_email_address@domain.invalid
> http://lists.rubyonrails.org/mailman/listinfo/rails
> _______________________________________________
> Rails mailing list
> removed_email_address@domain.invalid
> http://lists.rubyonrails.org/mailman/listinfo/rails
>

--
David A. Black (removed_email_address@domain.invalid)
* Ruby Power and Light, LLC (http://www.rubypowerandlight.com)
   > Ruby and Rails consultancy and training
* Author of "Ruby for Rails" from Manning Publications!
   > http://www.manning.com/black
This topic is locked and can not be replied to.