新手问题 rails 在 lib 中的文件怎么调用 helper 中的方法呢?

newnewnew · March 08, 2013 · Last by newnewnew replied at March 09, 2013 · 3193 hits

我在 lib 目录下有个 a.rb 文件 需要调用 app/helper/b.rb 中的某个方法 请问怎么调用呢?

include 那个 helper 即可 不过不推荐哦 应该改成 helper 调用 lib 里的方法比较好

You need to Sign in before reply, if you don't have an account, please Sign up first.