From: KJoyner <K...@kjoyner.com>
Date: Thu, 24 Jan 2008 23:20:26 -0800 (PST)
Local: Fri 25 Jan 2008 07:20
Subject: Re: Adding a delete confirmation
I have added the following that now works, except for the reload which
does not appear to be working as I intended. For completeness, I have included my updated delete method. var AJ =
authenticity_token_query_parameter_for_page:function()
}
Remote.Delete = Behavior.create( Remote.Base,
{ onclick: function( event ) { if ( confirm( 'Are you sure?' ) ) { var options = { url: this.element.href.gsub( '/delete$', '' ), method: 'delete', parameters: AJ.authenticity_token_query_parameter_for_page() }; options = Object.extend( options, this.options ); this._makeRequest( options );
});
def destroy
item = Item.find( params[ :id ] ) item.destroy respond_to do |wants|
On 24 Jan, 23:05, Jarkko Laine <jar...@jlaine.net> wrote:
> On 25.1.2008, at 8.05, KJoyner wrote:
> > Jarkko is correct, I am trying to create both an accessible link (when
> > After reading your post, I just thought to check my log to see if it
> This is the new csrf killer in action :-)
> You must pass the authenticity token to the link somehow (seehttp://edgedocs.planetargon.org/classes/ActionController/RequestForge...)
> Seehttp://edgedocs.planetargon.org/classes/ActionView/Helpers/UrlHelper....
> --
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||