On 18 Oct 2008, at 18:02, John Clancy <[EMAIL PROTECTED] 
s.net> wrote:

>
> So, I am nearly certain that Alex's original solution will work but  
> if I
> wanted to solve this within rails and avoid mucking with server files
> (which always scares little old me :) ).
>
> Is there a way to rewrite:
>  link_to(:controller=>'site', :action=>'login)
> so it always links to
>  https://xyz.com/site/login
> no matter if it is called from
>  http://xyz.com OR http://www.xyz.com
>
Have a look at the options that url_for takes

Fred
> I'm thinking a helper called:
>  def link_to_without_www(options, html_options={})
>    [some really awesome code here]
>  end
> -- 
> 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