1

I've been trying to set up Forem (a Rails 4 forum engine) using a guide and original docs.

Most things work, but I'm getting route errors. In my application.erb I have this route in a link_to:

topic_path(u)

The guide recommends that I preface this with my application name so my routes won't conflict with Forem's routes, so I did that as so:

H2le.topic_path(u)

(H2le is the application name set in application.rb)

However, this errors out:

"undefined method `topic_path' for H2le:Module"

Am I not setting the application name properly?

Wemmick
  • 186
  • 2
  • 14

1 Answers1

1

The problem was my being a Ruby newb and the guide I was following perhaps not being super explicit. It recommended to namespace the links like:

main_app.path

And I interpreted main_app to be a placeholder for my app name. Well, wrong. main_app is a built-in helper function, so it should literally just say main_app. I fixed this, and everything worked.

Wemmick
  • 186
  • 2
  • 14