Use optionally_search for group labels index page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
parent
eca3015d88
commit
534f8152c6
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue