If there is a long url, i want to generate a short url like those in twitter, is there some way to implement in ruby?
Thank you in advance.
I use the bitly gem. It's really simple.
gem install bitly # Use api version 3 or get a deprecation warning Bitly.use_api_version_3 # Create a client bitly = Bitly.new(username, api_key) # Call method shorten bitly.shorten('http://www.google.com').short_url