【发布时间】:2012-11-15 18:39:24
【问题描述】:
我的路线:
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'
routes_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?
【问题讨论】:
标签: ruby-on-rails routes subdomain