RailsCasts Pro episodes are now free!

Learn more or hide this

Geoff's Profile

GitHub User: gmaniac

Comments by Geoff


static page linking

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

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

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

Great screen casts, thank you!


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?