Explain me what is the naming convention in Rails?
Submitted by: Muhammad☛ Variables: For declaring Variables, all letters are lowercase, and words are separated by underscores
☛ Class and Module: Modules and Classes uses MixedCase and have no underscore; each word starts with a uppercase letter
☛ Database Table: The database table name should have lowercase letters and underscore between words, and all table names should be in the plural form for example invoice_items
☛ Model: It is represented by unbroken MixedCase and always have singular with the table name
☛ Controller: Controller class names are represented in plural form, such that OrdersController would be the controller for the order table.
Submitted by: Muhammad
☛ Class and Module: Modules and Classes uses MixedCase and have no underscore; each word starts with a uppercase letter
☛ Database Table: The database table name should have lowercase letters and underscore between words, and all table names should be in the plural form for example invoice_items
☛ Model: It is represented by unbroken MixedCase and always have singular with the table name
☛ Controller: Controller class names are represented in plural form, such that OrdersController would be the controller for the order table.
Submitted by: Muhammad
Read Online Ruby Developer Job Interview Questions And Answers
Top Ruby Developer Questions
☺ | Tell us what is class libraries in Ruby? |
☺ | Tell me can you call a private method outside a Ruby class using its object? |
☺ | Explain me what is the function of ORM in Ruby on Rails? |
☺ | Tell me the role of modules and mixins in Ruby? |
☺ | What is the difference extend and include? |
Top Web Developer Categories
☺ | Bootstrap Interview Questions. |
☺ | Front End Web Developer Interview Questions. |
☺ | Typography Interview Questions. |
☺ | Laravel PHP Developer Interview Questions. |
☺ | Junior Developer PHP Interview Questions. |