Humanize in accented characters

1

I have the following problem, I have some error messages on my system, but when there are accents in the messages, the humanize does not apply to these characters, I tried to use the gem 'brazilian-rails' , but since it is discontinued, some bugs happened in my system.

Example of my error:

"Número É muito longo (máximo: 9 caracteres)"

Even with the humanize, the is still upper case.

I use Rails 3.2.15

    
asked by anonymous 30.09.2014 / 16:13

1 answer

3

Can you give an example of how you are using humanize?

In any case, it's a problem with UTF-8.

Test in the console

"É".downcase

Does not work, while

"É".mb_chars.downcase

Yes.

So one output would be to use:

"Número É muito longo (máximo: 9 caracteres)".mb_chars.downcase.humanize
    
30.09.2014 / 18:52