Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cs_comments_service
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
cs_comments_service
Commits
03af2e0f
Commit
03af2e0f
authored
Aug 19, 2016
by
Toby Lawrence
Committed by
GitHub
Aug 19, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into platform/upgrade-to-ruby23
parents
4b6adbd3
14ed8a85
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
19 deletions
+6
-19
models/comment.rb
+6
-19
No files found.
models/comment.rb
View file @
03af2e0f
...
...
@@ -117,35 +117,22 @@ class Comment < Content
end
def
commentable_id
#we need this to have a universal access point for the flag rake task
if
self
.
comment_thread_id
t
=
CommentThread
.
find
self
.
comment_thread_id
if
t
t
.
commentable_id
end
end
return
nil
unless
self
.
comment_thread
self
.
comment_thread
.
commentable_id
rescue
Mongoid
::
Errors
::
DocumentNotFound
nil
end
def
group_id
if
self
.
comment_thread_id
t
=
CommentThread
.
find
self
.
comment_thread_id
if
t
t
.
group_id
end
end
return
nil
unless
self
.
comment_thread
self
.
comment_thread
.
group_id
rescue
Mongoid
::
Errors
::
DocumentNotFound
nil
end
def
context
if
self
.
comment_thread_id
t
=
CommentThread
.
find
self
.
comment_thread_id
if
t
t
.
context
end
end
return
nil
unless
self
.
comment_thread
self
.
comment_thread
.
context
rescue
Mongoid
::
Errors
::
DocumentNotFound
nil
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment