开发者

rails 3 routing performance issue

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 fo开发者_高级运维r 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!


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")%>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜