1

Say I'm integrating forem into my apps, and my routes.rb seems like this:

# items
resources :items, only: [:index, :show]

# forem
mount Forem::Engine, :at => '/forums'

And In my default layout layout/Application.erb.html, there's something like:

link_to 'items', items_path

and, in /forums pages, it occurs that:

undefined local variable or method `items_path'

so, how can I access other path helpers after routing into mounted class

NamiW
  • 1,572
  • 4
  • 19
  • 33

2 Answers2

1

You have to add main_app in front of the path like this:

link_to 'items', main_app.items_path
Pavan Katepalli
  • 2,372
  • 4
  • 29
  • 52
0

never mind guys, pls check this:

https://github.com/radar/forem/wiki/Installing---Upgrading#application-route-helpers

NamiW
  • 1,572
  • 4
  • 19
  • 33