summaryrefslogtreecommitdiff
path: root/app/controllers/groups/labels_controller.rb
diff options
context:
space:
mode:
authorMartin Wortschack <mwortschack@gitlab.com>2018-09-11 08:43:10 +0200
committerMartin Wortschack <mwortschack@gitlab.com>2018-09-11 08:43:10 +0200
commita2f7936c74e6c9c4eed7b1c5641f0c43d4ff1375 (patch)
tree82b1ea27fe2a9a1be884467e10d9bde688ce97d1 /app/controllers/groups/labels_controller.rb
parentbfd2181310097f5c0a92a43ffc2b7b9540b96ad3 (diff)
parent2f990e3408d00cad473d8dcf8a4e49155cc3cc33 (diff)
downloadgitlab-ce-a2f7936c74e6c9c4eed7b1c5641f0c43d4ff1375.tar.gz
merge master and resolve conflicts
Diffstat (limited to 'app/controllers/groups/labels_controller.rb')
-rw-r--r--app/controllers/groups/labels_controller.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/controllers/groups/labels_controller.rb b/app/controllers/groups/labels_controller.rb
index 3e0076ac935..e95123c0933 100644
--- a/app/controllers/groups/labels_controller.rb
+++ b/app/controllers/groups/labels_controller.rb
@@ -2,7 +2,6 @@ class Groups::LabelsController < Groups::ApplicationController
include ToggleSubscriptionAction
before_action :label, only: [:edit, :update, :destroy]
- before_action :available_labels, only: [:index]
before_action :authorize_admin_labels!, only: [:new, :create, :edit, :update, :destroy]
before_action :save_previous_label_path, only: [:edit]
@@ -11,10 +10,12 @@ class Groups::LabelsController < Groups::ApplicationController
def index
respond_to do |format|
format.html do
- @labels = @available_labels.page(params[:page])
+ @labels = @group.labels
+ .optionally_search(params[:search])
+ .page(params[:page])
end
format.json do
- render json: LabelSerializer.new.represent_appearance(@available_labels)
+ render json: LabelSerializer.new.represent_appearance(available_labels)
end
end
end