ruby -- 进阶学习(八)自定义方法route配置

 在route中进行修改,添加下面代码

1   namespace :mycontroller do
2       get 'mymethod' , :on=> :member
3     end
4   end

注: :on => :member照写,不是变量来的。。。

这样就可以使用mymethod_mycontroller_path。over~~ @_@!!

原文地址:https://www.cnblogs.com/lmei/p/3263486.html