Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby Ruby Loops Ruby Loops The While Loop

Chelsea Casareale
Chelsea Casareale
18,545 Points

CamelCase?

So I've been through a couple of Ruby courses now, and, coming from a JS background, I'm curious about the fact that there's no camelCase being used for variable and method names. Is that just not the thing to do when writing Ruby?

3 Answers

Yes you are right, by convention ruby variables and methods are written with downcase letters (exp: some_method).

You can get more info here about naming conventions in ruby. https://github.com/bbatsov/ruby-style-guide

rowend rowend
rowend rowend
2,926 Points

It is called snake_case

Chelsea Casareale
Chelsea Casareale
18,545 Points

That's kind of a bummer - I hate reaching to type the '_' lol. Oh well!

That link is great, thanks!