Variable
- all lowercaseword separated by underscores
Class && Module
- no underscorecamel style
Table
- pluralseperate by underscoresall lowercase
File
- lowercaseseperated by underscores
Controller
- pluralcamel style
Example:
https://gist.github.com/farmerworking/6877400
原文地址:Rails naming conventions, 感谢原作者分享。 因害怕失败而不敢放手一搏,永远不会成功