Commit 534f8152 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Use optionally_search for group labels index page

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent eca3015d
......@@ -11,8 +11,8 @@ class Groups::LabelsController < Groups::ApplicationController
respond_to do |format|
format.html do
@labels = @group.labels
@labels = @labels.search(params[:search]) if params[:search].present?
@labels = @labels.page(params[:page])
.optionally_search(params[:search])
.page(params[:page])
end
format.json do
render json: LabelSerializer.new.represent_appearance(available_labels)
......
......@@ -5,6 +5,7 @@ class Label < ActiveRecord::Base
include Referable
include Subscribable
include Gitlab::SQL::Pattern
include OptionallySearch
# Represents a "No Label" state used for filtering Issues and Merge
# Requests that have no label assigned.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment