I'm porting the existing website from PHP to Ruby on Rails 3 and I have to keep the urls unchanged.
I have the route:
get 'companies/' => 'companies#index', :as => :companies
In a view file I have:
link_to 'Companies', companies_path
and this generates the url "http://website.com/companies" instead of "http://website.com/companies/".
I want the slash at the end of the url. Is it possible?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…