Mention all the naming conventions in ruby on rails.
Following is a list of some naming conventions used in ruby on rails:
- Variables– it is used for the declaration of variables in which all the letters should be in lowercase and the words should be separated by underscore.
- Class and module– a class is declared which encapsulates every function. The class or module name can be written in mixed case and no underscores are used. Every word should start with an uppercase letter.
- Database table– a table is made for storing the data. It is the same as the naming conventions for variables.
- Model– mixed case is used and have singular with table name.
- Controller– names are represented in plural form.
Comments
Post a Comment