[英]Rails 3.2.3 - how to setup routes
Here are the url I need to be in my Rails application 这是我需要在Rails应用程序中使用的URL
site.com
site.com/page/11
site/tags/my_tag
site/tags/my_tag/page/123
where page
and tags
are actions of HomeController
. page
和tags
是HomeController
。 So how must the file routes.rb
look like in this case? 那么在这种情况下,
routes.rb
文件的外观如何?
You probably should start with: 您可能应该开始于:
match '/page', :to => 'home#page'
match '/tags', :to => 'home#tags'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.