Has anybody ever seen a great concise summary of best practices for file naming for a Rails project.
- Ruby classes: Underscores, all lower case
- Sass: ? Maybe hyphens?
- Haml, ERB: Underscores
- Yaml files?
- Directories (underscores always?)
- What else?
The only thing consistent seems to be:
- No caps (except README.md ? )
- No spaces
Underscores in file/directory names is a convention that is adopted in the Ruby community.
AFAIK, Sass has adopted the underscore convention as well.
To summarize, in a Ruby/Rails project use underscores everywhere (JS/CS could be either underscored or hyphenated).
Thanks @greg. I noticed this line in the Thoughtbot style guide. That was what piqued my curiosity.
Use hyphen-separated filenames, such as coffee-script.coffee.