开发者

How do I reference my existing routes when using a Rails 3.1 engine?

I'm using the forem engine in Rails 3.1, but my application layout references some resource routes such as users_path and new_sprite_path.

This all works fine outside the engine, but when I try to navigate to a page 开发者_开发技巧in the engine I get

undefined local variable or method `new_sprite_path' for #<#<Class:0x7f4faa4f9240>:0x7f4faa4dc320>

How can I get the engine to see the paths in my application correctly?


Use main_app.new_sprite_path.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜