What is the naming convention for variables?



What is the naming convention for variables?..

Answer / Munendra Kumar Gaur

In Rails, variable names should be descriptive and follow a snake_case naming convention (underscores separate words). Variable names should start with an underscore if they are private instance variables. Constants are written in ALL_CAPS_WITH_UNDERSCORES.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Ruby on Rails Interview Questions

Tell me what is polymorphic association in ruby on rails?

1 Answers  


Explain me what is the naming convention in rails?

1 Answers  


Is it possible to build a 50% bespoke e-commerce platform hence having the ability to customize everything down the line? For example would it make sense to start coding an application on the Ruby on Rails framework but where the most complex/time consuming code pieces (e.g. shopping cart, etc) can be initially bolted on (hence diminishing development time and cost) having the ability to change them completely further down the line?

1 Answers  


What is rails scaffolding?

1 Answers  


How many types of relationships does a model has?

1 Answers  


What is the difference between sessions and flash?

3 Answers  


Who developed ruby on rails?

1 Answers  


what is the command to create a migration?

1 Answers  


Explain how you can run rails application without creating databases?

1 Answers  


How to serialize data with yaml?

1 Answers  


what is rails caching?

1 Answers  


What is the naming convention for variables?

1 Answers  


Categories