Routes to index

(Tom) #1

I have a question,
In routes.rb,I see that

Discourse.filters.each do |filter|
    root to: "list##{filter}", constraints:"#{filter}"), :as => "list_#{filter}"

so my shall automatically route to and then it shall look for an action latest in list_controller but I cant see any action like this in list_controller
Have I missed anything? Thanks

(RĂ©gis Hanol) #2

No, there’s no redirect.

That’s because these methods are dynamically generated

(Tom) #3

sprry so how does it route the root
I dont see any GET '/'

(RĂ©gis Hanol) #4

Highly suggest that you learn more about how routing works in rails