Desk2Mob

Desk2Mob

Desk2Mob

Model vs. Scaffold?

  • A model just generates the model. Scaffold generates a controller and views, too.

./script/generate model mymodelname

  • creates an ActiveRecord model that is typically connected to a database, but doesn't have to be.

./script/generate scaffold scaffoldname

creates a model, a controller, a layout, some CSS styles, and more. This provides you with the model and everything else needed to work with it.

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

Posted on February 03, 2014 by Amit Pandya in Rails2


All Posts