这东西以前用过,今天写发现又忘记了。
翻看了下老代码应该是这样实现的。
1.在lib中新定义一个Module
2.在controller 里面 include Module_name
3.use the methods inside of module
ps. rails will automatically find the path of module.
这东西以前用过,今天写发现又忘记了。
翻看了下老代码应该是这样实现的。
1.在lib中新定义一个Module
2.在controller 里面 include Module_name
3.use the methods inside of module
ps. rails will automatically find the path of module.