vendor/gems/ziya-2.1.7/lib/ziya/core_ext/string.rb
# Same as Rails Inflector but eliminating inflector dependency
Same as Rails Inflector but eliminating inflector dependency
Same as Rails Inflector but eliminating inflector dependency
def ziya_underscore
    self.to_s.gsub(/::/, '/').
      gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').
      gsub(/([a-z\d])([A-Z])/,'\1_\2').
      tr("-", "_").
    downcase
  end
def ziya_underscore self . to_s . gsub ( / :: / , '/' ) . gsub ( / ([A-Z]+)([A-Z][a-z]) / , '\1_\2' ) . gsub ( / ([a-z \d ])([A-Z]) / , '\1_\2' ) . tr ( "-" , "_" ) . downcase end
Same as Rails Inflector but eliminating inflector dependency
Same as Rails Inflector but eliminating inflector dependency