Reputation: 93276
i have added one route and one link and the load time for the page is now 5-6 seconds more.
here is the routing:
root :to => 'firstpage#index'
resources :menus
# this one is added
match 'search' => 'search#index'
here is the link in the view:
<%= link_to "Sök", :controller => "search", :query => "ruby on rails" %>
i guess that rails is searching for the routing in the routing file, and that takes 5-6 secs more. i think i have done the routing wrong or the link could be more appropriate constructed.
could you see any "fault" on this?
thanks!
Upvotes: 0
Views: 227
Reputation: 2210
5-6 seconds seems a little excessive for this to be the problem.
you could try
<%= link_to "Sök", search_path(:query => "ruby on rails")%>
Upvotes: 1