Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why did Ruby on Rails deprecate the scaffold method

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?

like image 400
Rimian Avatar asked Nov 28 '22 19:11

Rimian


1 Answers

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.

like image 105
Andrew Vit Avatar answered Dec 08 '22 09:12

Andrew Vit