On 1/31/07, <b class="gmail_sendername">Ed Howland</b> <<a href="mailto:ed.howland@gmail.com">ed.howland@gmail.com</a>> wrote:<div><span class="gmail_quote"></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'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><div mv:attr=":id => #{myhelper(arg)}"></div><br><br>it legitimately renders it so:<br><div id="<%= myhelper(arg) %>"></div><br><br>But if you increase the argument count to more than 1,
e.g.:<br><div mv:attr=":id => #{myhelper(arg, 1)}"><br><br>It renders:<br><div></div></blockquote><div><br></div></div>I have tested this in the trunk and it is resolved. (We had fixed one of the parsing functions)
<br><br>So you can get this with the next release, which is due out any time now. <br><br>It's also available in the trunk.<br><br>I added this test to insure that it works<br><br> def test_attr_eval_helper_with_multi_params
<br> template = <<-END<br> <div mv:generate='foo/bar'><br> <span class="red" mv:attr=":id => #\{myhelper(arg, 1)\}">foo bar</span><br> </div>
<br> END<br> expected = {<br> 'foo/bar' => "<div><span class=\"red\" id=\"<%= myhelper(arg, 1) %>\">foo bar</span></div>"<br> }<br> assert_template_result expected, template
<br> end<br><br><br>Blessings,<br><br>Jeff<br>