This project is archived and is in readonly mode.

#2794 ✓resolved
johan.rejeep (at gmail)

titleize missing in ActiveSupport::Multibyte::Chars

Reported by johan.rejeep (at gmail) | June 12th, 2009 @ 08:56 AM | in 3.0.2

Hi!

I'm missing the method titleize in ActiveSupport::Multibyte::Chars.

Example:
"VarfÖr gick åke bakÅt".mb_chars.titleize.to_s Gives me:
"VarfÖr Gick åke BakÅt" When I expect:
"Varför Gick Åke Bakåt"

I solved it in my project with a simple monkey patch:

class ActiveSupport::Multibyte::Chars
  def titleize

self.split(/(\s)/).collect { |e| e.mb_chars.capitalize.to_s }.join($1)



end end

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Attachments

Referenced by

Pages