title: Ruby rails - submit_tag / button_tag switch/toggle between names
body: <p>How do I switch/toggle names between two or more names on single button?<br>
  For one condition I want the name to be as "Add", and for the other condition I want the name changed to "Remove". and switch between them based on status at the back end.     </p>
  
  <pre><code>  &lt;%= button_tag "Add" , :id =&gt; "add_or_remove_button", :onclick =&gt; "javascript:add_or_remove_button()"%&gt;
  </code></pre>
  
  <p>I can do "Add/Remove", and clicking on the same button will still do the job. But I want it specific. </p>