Sha256: 633ecc5ef8a815357a8067e875105ee0ff91332e6ba083613c2acfe619772a38
Contents?: true
Size: 279 Bytes
Versions: 33
Compression:
Stored size: 279 Bytes
Contents
class String def to_permalink str = ActiveSupport::Multibyte::Chars.new(self.dup) str = str.normalize(:kd).gsub(/[^\x00-\x7F]/,'').to_s str.gsub!(/[^-\w\d]+/xim, "-") str.gsub!(/-+/xm, "-") str.gsub!(/^-?(.*?)-?$/, '\1') str.downcase! str end end
Version data entries
33 entries across 33 versions & 3 rubygems