module StringToInternalIdentifier

Public Instance Methods

to_iid() click to toggle source
# File lib/erp_base_erp_svcs/extensions/core/string.rb, line 10
def to_iid
  iid = self.squish.gsub(' ', '_').tr('^A-Za-z0-9_', '').downcase

  #remove trailing _
  if iid[-1] == '_'
    iid.chop!
  end

  iid
end