Technical
Toggle With Plus Or Minus

Toggle with plus or minus through div rather then link_to_function.

This Solution was shared by Eric Farkas

public/javascript/application.js


function toggle_with_plus(elementId, spanId){
  Element.toggle(elementId);
  if($(elementId).style.display == "none")
    $(spanId).innerHTML = "[ + ]";
  else
    $(spanId).innerHTML = "[ - ]";
}

In your view


 <div id="div_to_serve_as_a_link_id" 
      style="font-size:12px;float: left; cursor: pointer; width: 40px;" 
      onclick="toggle_with_plus('div_to_toggle_id', 'div_to_serve_as_link_id')">[ + ]</div>

<div id="div_to_toggle_id" style="display:none">