Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

Geoff's Profile

GitHub User: gmaniac

Comments by Geoff

Avatar

static page linking

ruby
require 'subdomain'
constraints(Subdomain) do
  root :to => 'staticPage#staticPage', :as => 'subdomainRouteName'
end


<%=link_to "Subdomain", root_url(:subdomain => "subdomainRouteName") %>


<%=link_to "Home", root_url(:subdomain => false) %>

Great screen casts, thank you!

Avatar

So I am having trouble linking to static pages. I am trying to do something really simple, subdomain would be a static page and then link between several other static pages within that subdomain. I have it working with subdomain.domain.com/ and subdomain.domain.com/static-page, but how do I link to that?