fix #2196
This commit is contained in:
@@ -116,7 +116,7 @@ class PostsController < ApplicationController
|
||||
end
|
||||
|
||||
def random
|
||||
count = Post.fast_count(params[:tags])
|
||||
count = Post.fast_count(params[:tags], :statement_timeout => CurrentUser.user.statement_timeout)
|
||||
@post = Post.tag_match(params[:tags]).offset(rand(count)).first
|
||||
raise ActiveRecord::RecordNotFound if @post.nil?
|
||||
redirect_to post_path(@post, :tags => params[:tags])
|
||||
|
||||
Reference in New Issue
Block a user