Rails:如何在包含模块时定义路由

时间:2015-02-05 05:33:17

标签: ruby-on-rails module routes

我想在包含模块时定义新路由,我尝试以下代码,但它不起作用:

included do
  ActionDispatch::Routing::RouteSet.draw do
    get "test" => "public#test"
  end
end

请纠正我,谢谢!

0 个答案:

没有答案