Topic: URL encoding and decoding in Rails

Hi,

I have to decode the encoded URL using Rails.
Encoded URL contains '%3A', '%2F' hex decimals codes

For example, encoded URL: http%3A%2F%2Frailsformun.com
Corresponding decoded URL:  http://railsformun.com

Please give me procedure to decode the encoded URL.

Thanks & REGARDS,
kumar

Re: URL encoding and decoding in Rails

Take a look at http://ruby-doc.org/core/classes/CGI.html#M000545

>> CGI::unescape 'http%3A%2F%2Frailsformun.com'
=> "http://railsformun.com"

Vincent Woo Ruby on Rails Blog