parameterize method and no Western/Latin charset

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

parameterize method and no Western/Latin charset

Rocco G.

at the moment parameterize works only with Western/Latin charset:

"ร่วมเดินทางที่ฉีกทุกบริบทด้วยภาพ ไปกับแคมเปญ".parameterize => ""

but if we replace the gsub regex from /[^a-z0-9\-_]+/i to something similar to /[^[:word:]]/ all the characters are preserved:

"ร่วมเดินทางที่ฉีกทุกบริบทด้วยภาพ ไปกับแคมเปญ".gsub(/[^[:word:]]/, '-') => "ร่วมเดินทางที่ฉีกทุกบริบทด้วยภาพ-ไปกับแคมเปญ"

If interested I can send a pull request that adds this behavior as an optional flag of parameterize or as a new method.

Let me know what you think.


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
For more options, visit