Created
October 20, 2009 17:15
-
-
Save lightcap/214430 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= javascript_tag "var auth_token = #{form_authenticity_token.inspect};" if protect_against_forgery? %> | |
results in: | |
//<![CDATA[ | |
var auth_token = "ZOqYXojCWdc5FZlFY11sHtDW4dnC9eh2/G2M7PcDEDY="; | |
//]]> | |
</script> | |
When called like: | |
$j('#image-wall a.delete.remote').live("click", function () { | |
if (confirm('Are you sure?')) { | |
$j.post(this.href, { photo_id: $j(this).parents("li").attr("id").split("_")[1], authenticity_token: auth_token }, null, "script"); | |
return false; | |
} | |
return false; | |
}); | |
Has spaces in the authenticity_token where "+" would be. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment