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.
B31c8f5031486fa50ec7ee9e1350dec9?d=identicon&s=25 Marcus Blankenship (Guest)
on 2006-05-31 18: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
1fba4539b6cafe2e60a2916fa184fc2f?d=identicon&s=25 unknown (Guest)
on 2006-05-31 18:53
(Received via mailing list)
Hi --

On Wed, 31 May 2006, Marcus Blankenship 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
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>

--
David A. Black (dblack@wobblini.net)
* 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.