Method: String#to_code
- Defined in:
-
lib/jinda_engine/helpers.rb,
app/helpers/jinda_engine/jinda_helper.rb
887 888 889 890 891 892 893 894 |
# File 'lib/jinda_engine/helpers.rb', line 887 def to_code s= self.dup # s.downcase! # s.gsub! /[\s\-_]/, "" # s code, name = s.split(':') code.downcase.strip.gsub(' ','_').gsub(/[^#_\/a-zA-Z0-9]/,'') end |