link_to resource_path #3392
-
I have a card partial in my dashboard that I want to add some links to various resources. When I specify the URL as a string it works as expected. But trying to use an Avo rout I get errors. What am I missing? This works as expected:
This gives the error: ActionView::Template::Error (undefined local variable or method `resources_client_orders_path' for an instance of #Class:0x00007121c4489750)
This gives the error: ActionView::Template::Error (undefined method `resources_client_orders_path' for an instance of ActionDispatch::Routing::RoutesProxy)
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hey @sageworksstudio Because you're in a Rails engine, you must prepend the Instead of writing Use |
Beta Was this translation helpful? Give feedback.
Hey @sageworksstudio
Because you're in a Rails engine, you must prepend the
avo
engine object to the pathInstead of writing
resources_client_orders_path
you have to writeavo.resources_client_orders_path
.Use
main_app.some_path
when you want to reference paths from your main app