map.resources :books, :members => {:delete => :get}
What is this? It seems wrong. The CRUD method is destroy. Are you
trying to “alias” destroy with delete? Does your custom delete method
do something different than destroy? In any case the syntax looks
wrong to me.
It should look more like:
map.resources :books, :member => { :delete => :delete }
Notice “:member” is singular and you should NOT be doing “:get” if you
are deleting, or modifying, the resource in any way.
On Thu, 24 May 2007 16:21:10 -0700, Robert W. wrote:
Notice “:member” is singular and you should NOT be doing “:get” if you
are deleting, or modifying, the resource in any way.
It a hack for browser which do not have JavaScript. It will contains
only
button “Do you really want to delete?” which send it (unfortunatly) by
POST.
User click on “Delete” → Does he have JS support? —Yes—> Send
delete
| request and
No gets
destroy.rjs
|
> He is redirect to confirmation
page delete.rhtml which send
request by POST.