On Sun, Jul 29, 2012 at 10:09 AM, Linus Pettersson
<
linus.pe...@gmail.com> wrote:
> I need to redirect to some 3rd party websites. The issue is that some of the
> urls works to redirect and some doesn't work, using redirect_to url
> So, I need an approach that works with both (all?) URIs. Any ideas?
Write a utility method, e.g. redirect_to sanity_checked(url) that either
returns the original URL if it's good or an encoded version if not.
Which is not to say that simply encoding it will fix every error, so it's
probably worth checking that result too :-)
HTH,
--
Hassan Schroeder ------------------------
hassan.s...@gmail.com
http://about.me/hassanschroeder
twitter: @hassan