From: KJoyner <K...@kjoyner.com>
Date: Thu, 24 Jan 2008 17:19:11 -0800 (PST)
Local: Fri 25 Jan 2008 01:19
Subject: Adding a delete confirmation
I am trying to use Low Pro to add a delete confirmation. In my
controller, I have added a delete and a destroy action. These content of these actions are: def delete
def destroy
@item = Item.find( params[ :id ] )
redirect_to items_path
In the routes, I add a delete route to items by:
map.resources :items, :member => { :delete => :get }
I then have a view where I add a delete link like this (also using
= link_to "delete", delete_item_path( item ), :class => 'delete'
All of this works when I have javascript disabled. Now I am trying to
Remote.Delete = Behavior.create( Remote.Base, {
});
Event.addBehavior( {
'.delete' : Remote.Delete });
The onclick gets executed but it is not working correctly. Any help
would be appriciated. Thanks,
-- Ken 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.
| ||||||||||||||