Skip to content

Instantly share code, notes, and snippets.

@zapnap
Created October 7, 2008 20:48
Show Gist options
  • Save zapnap/15382 to your computer and use it in GitHub Desktop.
Save zapnap/15382 to your computer and use it in GitHub Desktop.
<!-- ugly ugly ugly --->
<li class="rating-5"><a href="http://localhost:3000/teams/foobar-patrol/rate/completeness/5" onclick="var f = document.createElement('form'); f.style.display = 'none'; this.parentNode.appendChild(f); f.method = 'POST'; f.action = this.href;var m = document.createElement('input'); m.setAttribute('type', 'hidden'); m.setAttribute('name', '_method'); m.setAttribute('value', 'put'); f.appendChild(m);var s = document.createElement('input'); s.setAttribute('type', 'hidden'); s.setAttribute('name', 'authenticity_token'); s.setAttribute('value', '2a1475f507de8460df36c0fdf0fa588420e87195'); f.appendChild(s);f.submit();return false;" title="Rate this 5 stars out of 5">5</a></li></ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment