<br><br><div><span class="gmail_quote">On 1/31/07, <b class="gmail_sendername">Ed Howland</b> &lt;<a href="mailto:ed.howland@gmail.com">ed.howland@gmail.com</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;">
I ran into this before, but I can&#39;t find any email from me about it.<br>Sorry if this is a repeat, but the problem persists in MV 0.3.1<br><br>If you have a helper method that you want to evaluate in a construct like:
<br><br>&lt;div mv:attr=&quot;:id =&gt; #{myhelper(arg)}&quot;&gt;&lt;/div&gt;<br><br>it legitimately renders it so:<br>&lt;div id=&quot;&lt;%= myhelper(arg) %&gt;&quot;&gt;&lt;/div&gt;<br><br>But if you increase the argument count to more than 1, 
e.g.:<br>&lt;div mv:attr=&quot;:id =&gt; #{myhelper(arg, 1)}&quot;&gt;<br><br>It renders:<br>&lt;div&gt;&lt;/div&gt;<br><br>You can try this in the interactive render. Perhaps it has something<br>to do with the commas? In any case, the bit between the &#39;#{&#39; and &#39;}&#39;
<br>should be dropped as is into the erb output. No parsing at all should<br>be done on this string.<br><br>In my case, I could not create an array for the args because it was a<br>mv:attr at the same level as the mv:block and one of the args was the
<br>bound variable ({|arg2| ...} of the block. In the end, I created a<br>closure with the other arg and called p.call(arg2) I don&#39;t think I<br>should have had to do that.<br><br>It only seems to occur with commas. Periods and other Ruby punctuation
<br>seem unaffected. My guess, w/o scouring the code, is you are looking<br>for a comma separating the key=&gt;value pairs int the attribute hash.<br><br>This is a serious problem for me, as it crops up all the time. We<br>
create a series of elements (divs, trs etc.,) in a block, then combine<br>the block variable with something else to dynamically generate an id<br>(that we use later in a form or with some RJS call.) I can trick it in<br>most cases, but I want to DRY it with a helper.&nbsp;&nbsp;I should be able to
<br>pass any number of args to my helper.<br><br>Also, I could, I suppose, use &lt;div id=&quot;{{{= myhelper(arg, 1) }}}&quot;&gt; but<br>that looks ugly in the designer, and I&#39;d rather not.</blockquote><div><br><br>
</div></div>Thanks for the email Ed. I will try to get the fix in with the others we are preparing right now. Should be out very soon.<br><br>Blessings,<br><br>Jeff<br>