Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 252e94e086
Fetching contributors…

Cannot retrieve contributors at this time

9 lines (8 sloc) 0.253 kb
module NormalizeNames
def normalize_name(str)
str ||= ''
result = str.gsub(/[^a-zA-Z0-9]+/, '_').gsub(/^_*/, '').gsub(/_*$/, '').downcase
result = "unknown_name_#{Time.now.to_i}#{rand(100000).to_i}" if result.blank?
result
end
end
Jump to Line
Something went wrong with that request. Please try again.