Reputation: 171321
My routes.rb
has the following 2 lines:
match "/", :to => "main#index"
match "main/index", :to => "main#index"
When I type localhost:3000/main/index
in a browser I see the proper page (views/main/index.html.erb
).
However, if I type just localhost:3000
I see public/index.html
(I expect to see views/main/index.html.erb
as well).
What am I missing ?
Upvotes: 1
Views: 150
Reputation: 132197
Remove public/index.html
:
rm public/index.html
This is happening because static files (those in public/
) are served in priority to the routes.
Upvotes: 2