Forum: Ruby on Rails Re: How do you get link_to to work correctly when using subd

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ae577905a543a759b11ce883ffd00ef6?d=identicon&s=25 Sean Mountcastle (Guest)
on 2006-01-18 21:16
(Received via mailing list)
Eric,

>        options[:host] = host.join '.'
>      end
>
>      return super(options, *params)
>    end

Thank you very much, though this breaks when using WEBrick (or Lighty
on a port other than 80) so I added the following after options[:host]
= host.join '.'

      options[:host] = [ options[:host], @request.port ].join ':'
unless @request.port == 80

It looks ugly, but it works.

Regards,
Sean
This topic is locked and can not be replied to.