Merge pull request #2879 from evazion/fix-dead-code

Eliminate dead code
This commit is contained in:
Albert Yi
2017-02-07 13:56:05 -08:00
committed by GitHub
36 changed files with 1 additions and 285 deletions

View File

@@ -1,6 +0,0 @@
class LandingsController < ApplicationController
def show
@explorer = PopularPostExplorer.new
render :layout => "blank"
end
end

View File

@@ -15,7 +15,7 @@ module Moderator
end
::Post.without_timeout do
@posts = ::Post.order("posts.id asc").pending_or_flagged.available_for_moderation(params[:hidden]).search(:tag_match => params[:query]).paginate(params[:page], :limit => per_page)
@posts = ::Post.order("posts.id asc").pending_or_flagged.available_for_moderation(params[:hidden]).tag_match(params[:query]).paginate(params[:page], :limit => per_page)
@posts.each # hack to force rails to eager load
end
respond_with(@posts)

View File

@@ -83,14 +83,6 @@ class PostsController < ApplicationController
end
end
def home
if CurrentUser.user.is_anonymous?
redirect_to intro_explore_posts_path
else
redirect_to posts_path(:tags => params[:tags])
end
end
def random
count = Post.fast_count(params[:tags], :statement_timeout => CurrentUser.user.statement_timeout)
@post = Post.tag_match(params[:tags]).random