I'm new to this ... trying to work through 'Ajax on Rails' book.

I used this code:

<script src="/javascripts/prototype.js" type="text/javascript">
</script>


<p><a href="#" onclick="updateElement()">Update Element </a></p>
<p id="response"></p>
<script type="text/javascript">
        function updateElement() {
                new Ajax.Request('/chapter2/myresponse', { onSuccess:
function(request) {
                        $('response').update(request.responseText);
                }})
        }
</script>

And it didn't work.  The shell window spit out a bunch of lines,
starting with,

ActionController::InvalidAuthenticityToken
(ActionController::InvalidAuthenticityToken):
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/
action_controller/request_forgery_protection.rb:86:in
`verify_authenticity_token'

Help?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to