Reputation: 18871
I am using Rails 3.1.1 and I would like to convert a string so to correctly pass that in an URL. For example to convert from something like some_text to%convert&èì
to some else...
What are Pros, Cons and Advices?
Upvotes: 1
Views: 2688
Reputation: 841
I think you should try with URI.escape
http://www.ruby-doc.org/stdlib-1.9.3/libdoc/uri/rdoc/URI/Escape.html
Don't forget to require 'open-uri'
Upvotes: 4