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
3dca9752
Commit
3dca9752
authored
8 years ago
by
Israel Barreto Sant'Anna
Browse files
Options
Downloads
Patches
Plain Diff
Removed default_location from learning object serializer
Signed-off-by:
Israel Barreto Sant'Anna
<
ibsa14@inf.ufpr.br
>
parent
ed95c348
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/models/learning_object.rb
+1
-1
1 addition, 1 deletion
app/models/learning_object.rb
app/serializers/learning_object_serializer.rb
+0
-5
0 additions, 5 deletions
app/serializers/learning_object_serializer.rb
with
1 addition
and
6 deletions
app/models/learning_object.rb
+
1
−
1
View file @
3dca9752
...
...
@@ -124,7 +124,7 @@ class LearningObject < ApplicationRecord
end
def
download_link
retrieve_link
object_type
.
try
(
:name
)
==
(
"Vídeo"
||
"Áudio"
)
?
default_attachment
.
try
(
:retrieve_cache_link
)
:
default_attachment
.
try
(
:retrieve_url
)
end
## score methods
...
...
This diff is collapsed.
Click to expand it.
app/serializers/learning_object_serializer.rb
+
0
−
5
View file @
3dca9752
class
LearningObjectSerializer
<
ActiveModel
::
Serializer
cache
key:
'learning_object'
,
expires_in:
4
.
hours
,
except:
[
:likes_count
,
:liked
,
:reviewed
,
:complained
]
def
default_location
object_type
==
(
"Vídeo"
||
"Áudio"
)
?
object
.
default_attachment
.
try
(
:retrieve_cache_link
)
:
object
.
default_attachment
.
try
(
:retrieve_url
)
end
def
default_mime_type
object
.
default_attachment
.
try
(
:mime_type
)
end
...
...
@@ -42,7 +38,6 @@ class LearningObjectSerializer < ActiveModel::Serializer
:object_type
,
:language
,
:default_attachment_id
,
:default_location
,
:default_mime_type
,
:score
,
:state
,
...
...
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