views: refactor quick search forms.

This commit is contained in:
evazion
2019-09-10 21:07:28 -05:00
parent ffccc503f7
commit 896f144eb6
23 changed files with 24 additions and 42 deletions

View File

@@ -5,6 +5,8 @@ class CommentsController < ApplicationController
skip_before_action :api_check
def index
params[:group_by] ||= "comment" if params[:search]
if params[:group_by] == "comment" || request.format == Mime::Type.lookup("application/atom+xml")
index_by_comment
elsif request.format == Mime::Type.lookup("text/javascript")