Generate random domain name


/ Published in: Rails
Save to your folder(s)



Copy this code and paste it in your HTML
  1. def domain_name
  2. [
  3. "www",
  4. ("a".."z").to_a.sort_by{rand}.join.slice(0..rand(15)),
  5. %w{com net org}[rand(3)]
  6. ].join('.').downcase
  7. end
  8.  

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.