Add `acronym` example to default `inflections.rb`

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Add `acronym` example to default `inflections.rb`

Artur Beljajev
If you search for "api" at Github (https://github.com/search?q=api&type=Code&utf8=%E2%9C%93&l=Ruby) you will notice a mix use of lowercase and uppercase of `API` word. Given it is widely used acronym, I wonder if we could add it as an example into default generated `inflections.rb`.

https://github.com/rails/rails/blob/master/railties/lib/rails/generators/rails/app/templates/config/initializers/inflections.rb.tt



--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Add `acronym` example to default `inflections.rb`

Artur Beljajev
So it might look like:

# ActiveSupport::Inflector.inflections(:en) do |inflect|
# ...
#   inflect.acronym 'API'
# end


--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.