> 
> How do I make it that no matter what the user type it, link_to would
> take them to an external site?
> 
> Sorry if this sounds like a too basic question.
> 
> Thanks.

do this no matter what URL user enters it will take him to correct page

        regex = /https?:\/\/(.*)/.match(@user.website)
        if regex==nil
           link_to @user.website,"http://#[email protected]}";, :popup 
=>"true"
        else
          link_to @user.website,"#[email protected]}", :popup =>"true"
-- 
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to