Skip to content

Instantly share code, notes, and snippets.

@vargheseraphy
Created January 30, 2015 07:09
Show Gist options
  • Save vargheseraphy/9b178b2bef2621788c40 to your computer and use it in GitHub Desktop.
Save vargheseraphy/9b178b2bef2621788c40 to your computer and use it in GitHub Desktop.
Ruby script to Parameterize the the string
require 'rubygems'
require 'active_support/all'
restaurants = [ "name 1",
"Karachi's",
"Kai D",
"Kaar- on ()",
"KaracDarbar",
]
restaurants.each do |restaurant|
puts restaurant.gsub(/'/, '').parameterize
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment