On Sun, Jul 29, 2012 at 10:09 AM, Linus Pettersson <[email protected]> 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 ------------------------ [email protected] http://about.me/hassanschroeder twitter: @hassan -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

