I am learning Ruby on Rails so I'm sure I'll find this out sooner or later.
Why would the scaffold method be deprecated in version 2 of Rails?
I am learning Ruby on Rails so I'm sure I'll find this out sooner or later.
Why would the scaffold method be deprecated in version 2 of Rails?
Because people thought it was supposed to be used for production, which would be a horrible idea. Instead you generate a scaffold which you can then easily edit and get it production ready from there.
The scaffold method went against the spirit of scaffolding, which is meant to give you a starting point that you are supposed to build upon for your own needs. By generating the scaffold dynamically, there is nothing for you to edit.
The new way with the scaffold generator lets you edit the scaffolded files so you can use it to build what you actually need.
There is however still a Rails plugin out there that will do just what the scaffold method did before. It's called ActiveScaffold.
I am assuming you are referring to Dynamic Scaffolding, as the scaffold generator is still around and going strong.
David Heinemeier Hansson is on record as saying that Dynamic Scaffolding looked great in demos, but since the whole point of Dynamic Scaffolding was to teach people to use rails, abstracting it away in a single line of code was more a curse then a blessing, as no one uses Dynamic Scaffolding in production code . . . just for demos and tutorials.
If you have a copy of AWDWR handy, you can read about his whole explanation on about p81 in the latest(3rd) edition (I didn't want to copy paste).
You can still: script/generate scaffold model_name to generate your scaffolded model.