Skip to main content
CS Teaching Tips

Main navigation

  • Browse All Tips
  • Tags
  • About
  • Cards
  • Rate Tips
  • Tip Sheets

Misconception: Students mix up whether model class names and database table names should be singular or plural in Ruby on Rails.

Share Misconception: Students mix up whether model class names and database table names should be singular or plural in Ruby on Rails. with FacebookShare Misconception: Students mix up whether model class names and database table names should be singular or plural in Ruby on Rails. with Twitter
Like(2095 Likes)
  • Model class names should be singular with the first letter of each word capitalized.
    • For example, a model class might be named LineItem.
  • Database table names should be plural with underscores separating words.
    • For example, a database table might be named line_items.
  • Note from the CS Teaching Tips Team: For more examples, check out the Ruby on Rails guide to naming conventions.

More about this tip

Tags

  • Content Misconceptions
  • Development Methods
  • Other Programming Language
  • Ruby
External Source
Interview with Cyndi Rader.
Other Tips By
Other Tips By Cyndi Rader

Similar tips

When learning in a playful context, students are less likely to be frustrated by difficulty or failure.
Have students instantiate personal hall pass objects when they wish to leave the classroom to help them learn that the values passed to a constructor have to match the number, type, and order of the arguments in the method signature.
Misconception: when working with Booleans, students assume that false means incorrect and true means correct.
  • CSTT Facebook
  • CSTT Twitter

For more information or to report a bug, contact us at admin@csteachingtips.org. Built with Bootstrap. Footer Icons by Mohammed Alyousfi. Powered by Drupal.

Privacy Policy

  • National Science Foundation
  • Sage Fox Group
  • Harvey Mudd College