Stange problem with Routes

I make a CRUD with Routes:

resources :movies

so, the destroy action stopped working:

No route matches "/movies/3"

so I did

match ‘videos/:id’ => 'videos#destroy’

then I get:

Couldn't find Movie with ID=new

then I do

match ‘movies/:id’ => 'movies#destroy’

match “movies/new” => "movies#new"

match “movies/:id/edit” => "movies#edit"

match “movies” => "movies#index"

And I get the same problem

Then I try:

resources :movies, :only => [:index, :edit, :new, :create, :destroy]

And get the same thing

Someone know why?


Hello dude, I have had the same error once! But my problem was a conflict between jquery and prototype!

I solved that problem just deleting any prototype file and installing jquery gem!

Hope it work for you too!

best regards

Thanks, I did,

now, he go to the post item, without delet it


You need to post snippets of your view and controller code in order to get a full assessment, but if I were trying to diagnose this on my own application, I’d initially look for an HTTP verb mismatch. Are you sure that the attempted destroy request is calling :method => :delete ?

solved this by redoing the button delete.
Was the same script, but work

Crazy O.O

Thanks everybody!