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 ...@@ -11,8 +11,8 @@ class Groups::LabelsController < Groups::ApplicationController
respond_to do |format| respond_to do |format|
format.html do format.html do
@labels = @group.labels @labels = @group.labels
@labels = @labels.search(params[:search]) if params[:search].present? .optionally_search(params[:search])
@labels = @labels.page(params[:page]) .page(params[:page])
end end
format.json do format.json do
render json: LabelSerializer.new.represent_appearance(available_labels) render json: LabelSerializer.new.represent_appearance(available_labels)
......
...@@ -5,6 +5,7 @@ class Label < ActiveRecord::Base ...@@ -5,6 +5,7 @@ class Label < ActiveRecord::Base
include Referable include Referable
include Subscribable include Subscribable
include Gitlab::SQL::Pattern include Gitlab::SQL::Pattern
include OptionallySearch
# Represents a "No Label" state used for filtering Issues and Merge # Represents a "No Label" state used for filtering Issues and Merge
# Requests that have no label assigned. # 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