Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我生成一个名为控制器的两个单词时,就像FooBarrails 创建一个控制器和这样的路径foo_bar并不漂亮。我希望路径至少是FooBar.
FooBar
foo_bar
可能的?建议?
取决于您的路线在 routes.rs 中的定义方式。例如:
# if you have named routes map.foobar '/foobar/:action', :controller => 'foobar' # if you have resources, this will generate map.resources :foo_bar, :as => 'foobar'
这适用于 Rails 2.3.*,在 Rails 3 中略有不同。