From 264e85ee598b4e1b885576dc56a082b223ce1e0b Mon Sep 17 00:00:00 2001 From: Marcela Ribeiro de Oliveira <mro15@inf.ufpr.br> Date: Tue, 24 Jan 2017 11:59:37 -0200 Subject: [PATCH] collections can add and remove educational_stages separately --- app/controllers/v1/collections_controller.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/controllers/v1/collections_controller.rb b/app/controllers/v1/collections_controller.rb index 4c7a2fd5..faabda49 100644 --- a/app/controllers/v1/collections_controller.rb +++ b/app/controllers/v1/collections_controller.rb @@ -5,11 +5,13 @@ class V1::CollectionsController < ApplicationController include ::DeletedObjectsController include ::HighlightsController include ::Paginator + include ::SubjectableController + include ::StageableController before_action :authenticate_user!, only: [:create, :update, :destroy] before_action :set_collection, only: [:show, :update, :destroy, :add_object, :delete_object] before_action :set_new_collection, only: :index - before_action :authorize!, except: [:create, :tagging, :untagging] + before_action :authorize!, except: [:create, :tagging, :untagging, :subjecting, :unsubjecting, :add_stages, :remove_stages] # GET /v1/collections # GET /v1/collections.json @@ -81,6 +83,8 @@ class V1::CollectionsController < ApplicationController def followable; set_collection; end def taggable; set_collection; end def sociable; set_collection; end + def subjectable; set_learning_object; end + def stageable; set_learning_object; end def set_collection @collection ||= Collection.find(params[:id]) -- GitLab