string - Using titleize for acronym in Rails -


I am defining some active records with acronyms. I RVPark (Recreational Vehicle Park) When I give the title of class name I am 'R.V. Park 'is actually' RV '. Park 'should be a good way to do this? Since this model shares the code with other models, I need to make a general solution, but I have not come up with one.

I saw a discussion on this, but there was not a solution working for me Any insight is appreciated.

UPDATE: See Answers @ Races for tracks 3.2 and up.


It looks like a corner case that the title was not designed for it. The problem is that Capital Creating will always turn RV in RV.

I will create a generic name function for those models which, by self.class.titleize internally, and then surcharge it into the RVP ark model.

Comments