Skip to content

Instantly share code, notes, and snippets.

@mikesjewett
Created October 16, 2012 19:38
Show Gist options
  • Save mikesjewett/3901474 to your computer and use it in GitHub Desktop.
Save mikesjewett/3901474 to your computer and use it in GitHub Desktop.
Ajax example
$("#follow_form").html("<%= escape_javascript(render('users/unfollow')) %>")
$("#followers").html('<%= @user.followers.count %>')
$("#follow_form").html("<%= escape_javascript(render('users/follow')) %>")
$("#followers").html('<%= @user.followers.count %>')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment