我的路线:
class ActionDispatch::Routing::Mapper
def draw routes_name
instance_eval(File.read(Rails.root.join('config', 'routes', "#{routes_name}.rb")))
end
routes_a.rb
root :to => 'home#index'
controller :home do
post 'terms'
路线_b.rb
root :to => 'business/dashboards#show'
如果我当前在子域中,community.website.com
并且我创建一个 link_to 如下:
= link_to 'Here', terms_path
它返回community.website.com/terms
而不是website.com/terms
.
我该如何返回website.com/terms
?