Lea,<br><br>I just added a test to confirm this and it appears to work in the trunk. So double check your syntax with the test code below and see if maybe it was a typo. <br><br>Otherwise maybe it was something that was recently fixed. I am planning to push out a new release today so if the below syntax does not work for you on your version, then the new version should fix it.
<br><br> def test_link_to_with_post_and_confirm<br> template = <<-END<br> <div mv:generate='foo/bar'><br> <a href="#" mv:link_to="{ :action => 'destroy', :id => component }, :confirm => 'Are you sure?', :post => true">Destroy</a>
<br> </div><br> END<br> expected = {<br> 'foo/bar' => "<div><%= link_to( 'Destroy', { :action => 'destroy', :id => component }, :confirm => 'Are you sure?', :post => true ) %></div>"
<br> }<br> assert_template_result expected, template<br> end<br><br><br>Blessings,<br><br>Jeff<br><br><br><br><div><span class="gmail_quote">On 2/20/07, <b class="gmail_sendername">Jeff Barczewski</b> <<a href="mailto:jeff.barczewski@gmail.com">
jeff.barczewski@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><span class="q">On 2/20/07, <b class="gmail_sendername">
Lea Viljanen</b> <<a href="mailto:Lea.Viljanen@cs.helsinki.fi" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Lea.Viljanen@cs.helsinki.fi</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 have a link in the form of:<br><br><%= link_to 'Destroy', { :action => 'destroy', :id => component },<br>:confirm => 'Are you sure?', :post => true %><br><br>in an application I'm converting to use Masterview. However, I haven't
<br>found a way to achieve exactly this with mv:link_to. Note, that in my<br>original application, the :confirm and :post get converted by Rails<br>framework to a piece of onclick= javascript, but Masterview just adds<br>
the :confirm and :post parameters to the link URL.<br><br>I could go through a separate destroy form/page, but I prefer it this<br>way, it gives direct feedback to user instead of jumping between pages.<br><br>Any hints appreciated,
<br> - Lea<br><br>--<br>Lea 'LadyBug' Viljanen Independent security consultant.<br><a href="mailto:ladybug@iki.fi" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">ladybug@iki.fi
</a> <a href="http://www.lavsecurity.fi/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.lavsecurity.fi/
</a><br></blockquote></div><br><br></span>I will take a look and see whether it is a syntax issue or defect. <br>
</blockquote></div><br><br clear="all"><br>-- <br>Jeff Barczewski, MasterView core team<br>Inspired Horizons Ruby on Rails Training and Consultancy<br>Next Ruby on Rails plus JRuby workshop Feb 22-24 St. Louis, MO<br><a href="http://inspiredhorizons.com/training/rails/index.html">
http://inspiredhorizons.com/training/rails/index.html</a>