In the rail, what is the best way to ensure a technical name is properly capitalized? For example, if I have the following:
-
"javascript"
"Ruby on Rail" < / Li>
"html5"
"ios"
Then I expect them
" Using HTML 5
"iOS"
using
technology.capitalize yeilds:
"Html5"
- >
You can access RailSave ActiveSupport These methods will be used to add your list of words to Inhalans
Specifically, you will add a
acronym call for each of your custom words
config / initializers / Inflections.rb
ActiveSupport :: Make Inflector.inflections | Inflect | Inflect.acword 'javascript' ... end "javascript" .inderscore.camelize # = & gt; "Javascript"
No comments:
Post a Comment