1. Technology
You can opt-out at any time. Please refer to our privacy policy for contact information.

Ruby on Rails Tutorial - Starting the Blog


5 of 8

What the Scaffold Generator Created

The scaffold generator did quote a lot for you.

  • Generated a Post migration - The migration is what creates database tables and columns. Look for the new posts migration in app/db/migrations. If you wish to add any more database columns related to a post, add them to this migration.

  • Generated a Post model - The Post model is where you should add any validations to data. You can find the model generated by the scaffold generator at app/models/post.rb.

  • Generated a Post controller - The Post controller contains all actions to view, edit and create new blog posts. You can find it at app/controllers/posts_controller.rb.

  • Generated views for the Post controller - These can be found in app/views/posts.

  1. About.com
  2. Technology
  3. Ruby
  4. Ruby on Rails
  5. What the Scaffold Generator Created

©2014 About.com. All rights reserved.