You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following the logic that each word should be separated by an underscore in the file name and a capital letter in the class name, one might expect that the class "SomeXML" should be translated into "some_x_m_l.rb".
This however does not work with Rails and there is no mention of class naming in the rails guide.
This might be a useful addition to this guide.
The text was updated successfully, but these errors were encountered:
I was under the impression that acronyms are typically presented as one work in the file name. I've never seen a file name like some_x_m_l.rb, so I'd advice against this practice.
I agree that file should always be named some_xml.rb, but I think it could be worth covering whether the class name would be SomeXML or SomeXml. My impression is the former is more common in the Ruby world, the latter in the JavaScript and Java worlds.
The guide doesn't give any specification about file naming in the case of acronyms in the class name. https://github.com/rubocop-hq/ruby-style-guide#snake-case-for-files
Following the logic that each word should be separated by an underscore in the file name and a capital letter in the class name, one might expect that the class "SomeXML" should be translated into "some_x_m_l.rb".
This however does not work with Rails and there is no mention of class naming in the rails guide.
This might be a useful addition to this guide.
The text was updated successfully, but these errors were encountered: