Skip to main content
CS Teaching Tips

Main navigation

  • Browse All Tips
  • Tags
  • 3D
  • About
  • 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
  • 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

Because high-school students are interested in driving, transportation is a great model for introducing class hierarchies and interfaces.
Have students explain their problem and ask questions about it to an inanimate object when debugging so they have a clearer idea of what the problem is before asking for help.
Rotate students into different pairs during a single class period so they learn to explain and read code quickly.

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

Privacy Policy