Please help
THanks
This is more of a general question or Rails question than Rails
Spinoffs. Next time, consider posting to RubyOnRails-Talk instead.
Gcompany a écrit :
> how do we convert long url to short url in a rails app like
> snipurl.com or dwarfurl.com
1) Devise a short ID generation algorithm (can be anything, really)
2) Store a mapping from the short, generated ID to the long URL you want
in a DB table somewhere.
3) Provide a controller that takes the short ID as a parameter, reads
the DB table and issues a redirect to the long URL.
Now, unless you're on a GET access with plenty of arguments inline,
Rails app URLs are usually darn short.
--
Christophe Porteneuve aka TDD
t...@tddsworld.com
how do we convert long url to short url in a rails app like
Best regards
Peter De Berdt