使用Rails 3.1引擎时如何引用现有路由?

Dan*_*ore 0 routes rails-engines ruby-on-rails-3.1

我在Rails 3.1中使用了forem引擎,但我的应用程序布局引用了一些资源路由,例如users_pathnew_sprite_path.

这一切都在引擎外工作正常,但是当我尝试导航到引擎中的页面时,我得到了

undefined local variable or method `new_sprite_path' for #<#<Class:0x7f4faa4f9240>:0x7f4faa4dc320>
Run Code Online (Sandbox Code Playgroud)

如何让引擎正确查看我的应用程序中的路径?

Dan*_*ore 5

使用main_app.new_sprite_path.