Mention all the naming conventions in ruby on rails.

devquora
devquora

Posted On: Feb 22, 2018

 

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.

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    Ruby on Rails Interview Questions

    Explain the features of ruby on rails.

    Some of the features of ruby on rails are listed below-Meta-programming: code generation is used but for heavy liftin..

    Ruby on Rails Interview Questions

    How is the model view controller framework used in ruby on rails?

    The web development is usually divided into three subsystems closely integrated to each other. They are: –Model (ac..

    Ruby on Rails Interview Questions

    What do you understand by rails?

    It is a web application framework which is written in ruby language and is developed by David Hansson. It is an open so..