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