# Why does 2.0 scaffold no longer specify a model?

**URL:** <https://www.ruby-forum.com/t/why-does-2-0-scaffold-no-longer-specify-a-model/132648>\
**Category:** Rails\
**Created:** [March 22, 2008, 2:13pm UTC](https://www.ruby-forum.com/t/why-does-2-0-scaffold-no-longer-specify-a-model/132648 "2008-03-22T14:13:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![oldbug](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/c0e974/32.png) [@oldbug](https://www.ruby-forum.com/u/oldbug)\
**Post date:** [March 22, 2008, 2:13pm UTC](https://www.ruby-forum.com/t/why-does-2-0-scaffold-no-longer-specify-a-model/132648/1 "2008-03-22T14:13:31Z")

</div>

I am curious why the new scaffold generator doesn’t include a  
parameter for the model. As my friend Google and I have looked  
around, we’ve found all sorts of pages claiming that 2.0 breaks all  
the old tutorials because of this change (which it does), a lot of  
pages showing how to work around this (which is trivial), but I have  
yet to find an explanation for the rationale behind the change. The  
closest I’ve found is a page that claimed that this is due to the new  
RESTful routing mechanism and that with a RESTful application, the  
model and the controller have the same name. That confused me even  
more, since my understanding of REST is that the controller is the  
“resource”, not the model.

Anyway, I’m curious to understand why this change was made, and  
whether there would be any benefit to submitting a patch adding the  
capability to specify the model behind the controller when generating  
a scaffold.

–wpd

---

<div class="post-metadata">

**Author:** ![oldbug](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/c0e974/32.png) [@oldbug](https://www.ruby-forum.com/u/oldbug)\
**Post date:** [March 22, 2008, 3:29pm UTC](https://www.ruby-forum.com/t/why-does-2-0-scaffold-no-longer-specify-a-model/132648/2 "2008-03-22T15:29:44Z")

</div>

HI –

On Sat, 22 Mar 2008, Patrick D. wrote:

> more, since my understanding of REST is that the controller is the  
> “resource”, not the model.

Actually the resource is the resource 🙂 But you’re right that the  
controller is the Rails layer that maps most closely to it. In my  
opinion it’s very unfortunate that the term “resource” has become  
almost synonymous in many people’s minds with “controller-model stack  
with a given name”. The scaffodling, at the very least, strongly  
reinforces this perception.

> Anyway, I’m curious to understand why this change was made, and  
> whether there would be any benefit to submitting a patch adding the  
> capability to specify the model behind the controller when generating  
> a scaffold.

That would be a start. The ability not to generate a model at all  
would also be a big step.

David

–  
Upcoming Rails training from David A. Black and Ruby Power and Light:  
ADVANCING WITH RAILS, April 14-17 2008, New York City  
CORE RAILS, June 24-27 2008, London (Skills Matter)  
See [http://www.rubypal.com](http://www.rubypal.com) for details. Berlin dates coming soon!
