Sha256: 4424cb2e4cc80ce3634722ad1ac0a14df3f79a9fca006f14d8d2eb788887ab1a
Contents?: true
Size: 248 Bytes
Versions: 8
Compression:
Stored size: 248 Bytes
Contents
# Using Biogem with Rails class String # Handle underscore in routing template def underscore self.gsub(/::/, '/'). gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2'). gsub(/([a-z\d])([A-Z])/,'\1_\2'). tr("-", "_"). downcase end end
Version data entries
8 entries across 8 versions & 1 rubygems