In our site, users can have a url associated with their account to which they are redirected when their login expires. This can differ from user to user, and is prone to being mis-copied, or the sites in question not being there any more etc. I'd like to test if the url is valid before sending the user on to it.
So, i want, in the controller, to do something like this - if external_url_is_valid?(user.expiry_url) redirect_to user.expiry_url else redirect_to "our_default_expiry_page" end Can anyone tell me a nice, simple and efficient way of doing the "external_url_is_valid?" bit? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---