Desk2Mob

Desk2Mob

Desk2Mob

Model Vs Scaffold?

  • A model just genenates the model. Scaffold generates a controller and views too.
./script/generate model mymodelname

creates an activerecord model that is usually linked to a database but doesn't have to be.

./script/generate scaffold scaffoldname 

creates a model, a controller, a layout, some css styles etc. This gives you the model plus everything else you would need to play with it.

  • This doesn't mean that scaffolding should be used all the time, it is good for quick development but it isn't customisable enough and isn't supposed to be used in a production environment.

Posted on February 03, 2014 by Amit Pandya in Rails


All Posts