Skip to content
Snippets Groups Projects
Commit 264e85ee authored by Marcela Ribeiro de Oliveira's avatar Marcela Ribeiro de Oliveira
Browse files

collections can add and remove educational_stages separately

parent ef31bb22
No related branches found
No related tags found
No related merge requests found
......@@ -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])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment