def link_to(name,url_params = {},html_options = "",confirm = nil)
      url = url_for(url_params)
      if (url_params.is_a?(String) || url_params[:action].to_s != 'delete')
        "<a href=\"#{url}\" #{html_options}>#{name || url}</a>"
      else
        "<a href=\"#{url}\" #{html_options} onclick=\""+  #if (confirm('#{confirm}')) {
        "var f = document.createElement('form'); f.style.display = 'none';" +
        "this.parentNode.appendChild(f); f.method = 'POST'; f.action = this.href;f.submit();"+
        "return false;\">#{name || url}</a>"
      end
    end
def link_to(name,url_params = {},html_options = "",confirm = nil)
      url = url_for(url_params)
      if (url_params.is_a?(String) || url_params[:action].to_s != 'delete')
        "<a href=\"#{url}\" #{html_options}>#{name || url}</a>"
      else
        "<a href=\"#{url}\" #{html_options} onclick=\""+  #if (confirm('#{confirm}')) {
        "var f = document.createElement('form'); f.style.display = 'none';" +
        "this.parentNode.appendChild(f); f.method = 'POST'; f.action = this.href;f.submit();"+
        "return false;\">#{name || url}</a>"
      end
    end
Examples of how to use link_to method:

 link_to "Visit Other Site", "http://www.rhomobile.com/"
 ==> <a href=\"http://www.rhomobile.com/\" >Visit Other Site</a>

 link_to "Help", { :action => "help" }
 ==> <a href=\"/application/model/help\" >Help</a>

 link_to "Delete", { :action => "delete", :id => '{12}' }
 ==> <a href="/application/model/{12}/delete"  onclick="var f = document.createElement('form');
 f.style.display = 'none';this.parentNode.appendChild(f); f.method = 'POST';
 f.action = this.href;f.submit();return false;">Delete</a>

 link_to "Show", { :action => "show", :id => '{12}'},"style=\"height:4px;width:7px;border-width:0px;\""
 ==> <a href="/application/model/{12}/show" style="height:4px;width:7px;border-width:0px;">Show</a>

 link_to "Delete", { :action => "delete", :id => '{12}' }, "class=\"delete_link\""
 ==> <a href="/application/model/{12}/delete" class="delete_link" onclick="var f = document.createElement('form');
 f.style.display = 'none';this.parentNode.appendChild(f); f.method = 'POST';
 f.action = this.href;f.submit();return false;\">Delete</a>"

 link_to "Invate",:action => :invite, :query => {:name => 'John Smith', 'address' => "http://john.smith.com"}
 ==> <a href="/application/model/invite?name=John%20Smith&address=http%3A%2F%2Fjohn.smith.com" >Invate</a>