Sha256: 421cc859b0d109ae64dccff3cd507131dbd2ebe61a6d6b51bf122e9684fcea88
Contents?: true
Size: 355 Bytes
Versions: 11
Compression:
Stored size: 355 Bytes
Contents
class String def to_permalink # Pinched: http://github.com/jrun/merb_permalink_fu/tree/master/lib/merb_permalink_fu/permalink_fu.rb string = self string = string.gsub(/\W+/, ' ') string = string.strip string = string.downcase string = string.gsub(/\ +/, '-') # spaces to dashes, preferred separator char everywhere end end
Version data entries
11 entries across 11 versions & 1 rubygems