the element will generate this code:<br><br>&lt;div style=&quot;color: #{colors[rand(colors.size)]}&quot;&gt;...&lt;/div&gt;<br><br>which does what you want.<br><br>-g.<br><br><div><span class="gmail_quote">On 7/10/07, <b class="gmail_sendername">
Jonathan Buch</b> &lt;<a href="mailto:john@oxyliquit.de">john@oxyliquit.de</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br><br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;div style=&quot;color: \#{@color}&quot;&gt;<br>&gt; &lt;?r colors = [ &quot;#ff0&quot;, &quot;#f00&quot;, &quot;#00f&quot;, #&quot;0ff&quot; ] ?&gt;<br>&gt; &lt;Box color=&quot;colors[rand(colors.size
)]&quot;&gt;<br><br>are you sure?&nbsp;&nbsp;`colors[rand(colors.size)]` will have to be eval&#39;ed<br>somewhere, where is that done?&nbsp;&nbsp;Either magic or one has to do that<br>in the Element oneselve (probably with a binding to the controller
<br>scope again).<br><br>Jo<br><br>--<br>Using Opera&#39;s revolutionary e-mail client: <a href="http://www.opera.com/mail/">http://www.opera.com/mail/</a><br>_______________________________________________<br>Nitro-general mailing list
<br><a href="mailto:Nitro-general@rubyforge.org">Nitro-general@rubyforge.org</a><br><a href="http://rubyforge.org/mailman/listinfo/nitro-general">http://rubyforge.org/mailman/listinfo/nitro-general</a><br></blockquote></div>
<br><br clear="all"><br>-- <br><a href="http://phidz.com">http://phidz.com</a><br><a href="http://blog.gmosx.com">http://blog.gmosx.com</a><br><a href="http://cull.gr">http://cull.gr</a><br><a href="http://www.joy.gr">http://www.joy.gr
</a><br><a href="http://nitroproject.org">http://nitroproject.org</a>