Daniel X Moore
Daniel X Moore

Reputation: 15070

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?

Upvotes: 0

Views: 269

Answers (1)

Daniel X Moore
Daniel X Moore

Reputation: 15070

Use main_app.new_sprite_path.

Upvotes: 5

Related Questions