posts: fix /posts/random?tags=... redirect.
Fix /posts/random?tags=touhou to redirect to /posts/1234?q=touhou instead of /posts/1234?tags=touhou. Fixes the search bar on random posts not containing the current search.
This commit is contained in:
@@ -132,7 +132,7 @@ class PostsController < ApplicationController
|
||||
raise ActiveRecord::RecordNotFound if @post.nil?
|
||||
authorize @post
|
||||
respond_with(@post) do |format|
|
||||
format.html { redirect_to post_path(@post, :tags => params[:tags]) }
|
||||
format.html { redirect_to post_path(@post, q: params[:tags]) }
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user