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(2173 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

Mention to students that individual blocks in Scratch and Snap can be tested by double clicking them in the block library so they know this useful, non-intuitive trick for learning what an individual block does.
Have students draw a scalable smiley face through programming to motivate the importance of using variables.
When teaching null dereferences, show a call that dereferences a null pointer in a debugger to give students a snapshot of what is happening.
  • 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