开发者

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

开发者 https://www.devze.com 2023-03-22 22:29 出处:网络
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.

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

精彩评论

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

关注公众号