stringex
stringex copied to clipboard
Some [hopefully] useful extensions to Ruby’s String class. It is made up of three libraries: ActsAsUrl [permalink solution with better character translation], Unidecoder [Unicode to Ascii transliterat...
Currently, "武汉" is transliterated (via `to_url`) as "wu-yi". I have it on good authority that this is incorrect and should be transliterated as "wu-han", so this PR changes the transliteration...
We're using stringex 2.7.1 in a Rails project and noticed that dollar signs come through with the `acts_as_url` plugin and `.to_url` string method if they're multiples or not preceding numbers....
Thanks for this library! ``` "𝔭𝔬𝔱𝔦𝔬𝔫 𝔰𝔢𝔩𝔩𝔢𝔯".to_ascii => "?????? ??????" ``` Would be a nice enhancement for this to output: ``` "𝔭𝔬𝔱𝔦𝔬𝔫 𝔰𝔢𝔩𝔩𝔢𝔯".to_ascii => "potion seller" ``` There is a...
will able to update/reinitialize the `url` database column with existing data.
Is it posible to turn of conversation of symbols to words in url? Like an example by default stringex is converting "."=>"dot", "/"=>"slash" and etc... Thank you!!
Current scope implementation fails if one or more of the scope attribute values is nil. One may want to use nullable values as scope parameters when using stringex/acts_as_url in combination...
I have a Company model, with fields name and slug: ``` class Company < ActiveRecord::Base acts_as_url :name, url_attribute: :slug end ``` For new records, the gem converts asian characters to...
As demonstrated in `test_handling_duplicate_urls_with_limits`, where the `:limit` is given as 13, but the resulting string is 15 characters long. I'm happy to work on a fix to address this.
(Disclaimer: this change is written by @Fred-JulieDesk, I take no credit or responsibility, I'm just the pull request creator :) ) This change freezes the `.` character that is used...