wyc
wyc

Reputation: 55263

Delete actions of this tutorial not are not working because I'm using Rails 3.1 which uses jQuery?

I'm following this tutorial"

http://ruby.railstutorial.org/

The tutorial seems to be using Rails 3.0. I am using Rails 3.1.

I get the following errors each time I try to delete a micropost:

No route matches [GET] "/microposts/301"

and deleting a user takes me to the user's page instead:

http://localhost:3000/users/6

I heard Rails 3.1 uses jQuery instead of Prototype.js.

Do I have to create o download any files in order to get the deleting action working? (in which files do I have to place them and how do I call/include them?).

Upvotes: 0

Views: 64

Answers (2)

tankard
tankard

Reputation: 48

There is an entire chapter about rails 3.1 in that tutorial.

Upvotes: 1

ksol
ksol

Reputation: 12235

Can you show us the code (at least the view) ? Right now, I'd say that while the route is fine, the method should be DELETE, not GET. Do you pass :method => :delete to link_to ?

Upvotes: 0

Related Questions