diff --git a/app/controllers/static_controller.rb b/app/controllers/static_controller.rb index cfb623c05..3379f06b0 100644 --- a/app/controllers/static_controller.rb +++ b/app/controllers/static_controller.rb @@ -1,30 +1,4 @@ class StaticController < ApplicationController - def benchmark - n = 1_000 - - Benchmark.bm do |x| - x.report("default") do - n.times do - view_context.link_to("test", :controller => "posts", :action => "index", :tags => "abc") - end - end - - x.report("posts_path") do - n.times do - view_context.link_to("test", posts_path(:tags => "abc")) - end - end - - x.report("fast link to") do - n.times do - view_context.fast_link_to("test", :controller => "posts", :action => "index", :tags => "abc") - end - end - end - - render :nothing => true - end - def terms_of_service render :layout => "blank" end diff --git a/app/models/wiki_page.rb b/app/models/wiki_page.rb index e59f167ab..3e4662da0 100644 --- a/app/models/wiki_page.rb +++ b/app/models/wiki_page.rb @@ -43,6 +43,10 @@ class WikiPage < ActiveRecord::Base if params[:creator_name] q = q.where("creator_id = (select _.id from users _ where lower(_.name) = ?)", params[:creator_name].downcase) end + + if params[:sort] == "time" + q = q.order("updated_at desc") + end q end diff --git a/app/views/pool_versions/index.html.erb b/app/views/pool_versions/index.html.erb index 59cbf81b1..5d576fbc5 100644 --- a/app/views/pool_versions/index.html.erb +++ b/app/views/pool_versions/index.html.erb @@ -18,7 +18,7 @@ <% @pool_versions.each do |pool_version| %>