On Tue, Aug 25, 2009 at 11:52 PM, Nik Cool<[email protected]> wrote:
> On my page i am displaying business url entered by user it stored in > database > (code is in haml) > > = link_to @user.website,@user.website > > if url stored in database is "www.abc.com" > I want user to go to only "http://abc.com" Those don't match -- do you want the URL to be 'http://www.abc.com' or do you want to strip the 'www' out? If you just want the 'http://' added, - link_to @user.website, "http://#[email protected]}" should work. And just for clarity -- "www.abc.com" is a hostname, not a URL, which requires a protocol (http, https, ftp, etc.). You might want to (re)consider which is most appropriate to store for your app's current and future use. FWIW, -- Hassan Schroeder ------------------------ [email protected] 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 this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

