我在Rails 3.1中使用forem引擎,但我的应用程序布局引用了一些资源路由,例如users_path
和new_sprite_path
。
这一切都在引擎外工作正常,但是当我尝试导航到引擎中的页面时我得到了
undefined local variable or method `new_sprite_path' for #<#<Class:0x7f4faa4f9240>:0x7f4faa4dc320>
如何让引擎正确查看我的应用程序中的路径?
答案 0 :(得分:5)
使用main_app.new_sprite_path
。