Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cleaning-portalmec
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Richard Fernando Heise Ferreira
cleaning-portalmec
Commits
264e85ee
Commit
264e85ee
authored
8 years ago
by
Marcela Ribeiro de Oliveira
Browse files
Options
Downloads
Patches
Plain Diff
collections can add and remove educational_stages separately
parent
ef31bb22
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/controllers/v1/collections_controller.rb
+5
-1
5 additions, 1 deletion
app/controllers/v1/collections_controller.rb
with
5 additions
and
1 deletion
app/controllers/v1/collections_controller.rb
+
5
−
1
View file @
264e85ee
...
...
@@ -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
])
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment