# Rails 3 and destroying models

**URL:** <https://www.ruby-forum.com/t/rails-3-and-destroying-models/182483>\
**Category:** Rails\
**Created:** [January 28, 2010, 8:22pm UTC](https://www.ruby-forum.com/t/rails-3-and-destroying-models/182483 "2010-01-28T20:22:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hatless](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/848f3c/32.png) [@hatless](https://www.ruby-forum.com/u/hatless)\
**Post date:** [January 28, 2010, 8:22pm UTC](https://www.ruby-forum.com/t/rails-3-and-destroying-models/182483/1 "2010-01-28T20:22:56Z")

</div>

Has anyone been playing around with the Rails 3 code? I’m having an  
issue  
with destroying models.  
I started an app using Yehuda’s “Spinning up a new Rails app” example.  
Worked great. “script/generate scaffold Post title:string body:text”  
Awesome. “rake db:migrate”. Great. Everything works… except  
destroying.  
The generated view shows this:

[data-url="/posts/3" rel="nofollow"\>Destroy](https://www.ruby-forum.com/posts/3)

Which looks correct, as far as I know. But when I hit it, no confirm  
dialog,  
and I get this in the server log:

Started GET “/posts/3” for 67.163.143.192 at 2010-01-28 14:23:43

Processing by PostsController#show as HTML

Parameters: {“id”=\>“3”}

Post Load (0.2ms) SELECT “posts”.\* FROM “posts” WHERE (“posts”.“id” =  
3)

> LIMIT 1

Rendered posts/show.html.erb within layouts/posts.html.erb (41.7ms)

Completed in 51ms (Views: 43.3ms | ActiveRecord: 0.2ms) with 200

So apparently it’s not understanding the data-method information.

This leaves me with two questions. One, am I doing something wrong? And  
two,  
what’s the best resource for keeping up with things like this, so that I  
don’t have to ask what could be a dumb question? I’m already subscribed  
to  
rails-core, and several rails-related blogs… suggestions?

Thanks,  
Steve

---

<div class="post-metadata">

**Author:** ![hatless](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/848f3c/32.png) [@hatless](https://www.ruby-forum.com/u/hatless)\
**Post date:** [January 28, 2010, 9:32pm UTC](https://www.ruby-forum.com/t/rails-3-and-destroying-models/182483/2 "2010-01-28T21:32:00Z")

</div>

Continuing to play around with it, apparently the javascript tags aren’t  
included in the scaffolding. When I include them all, the confirmation  
dialog comes up, but still makes a GET request.

Maybe that just hasn’t been implemented yet. Hm.
