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
9f427757
Commit
9f427757
authored
Jul 25, 2013
by
Your Name
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "fix merge conflict"
This reverts commit
5f90d8fd
, reversing changes made to
55cc9867
.
parent
5f90d8fd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 additions
and
8 deletions
+1
-8
models/comment.rb
+0
-7
models/comment_thread.rb
+1
-1
No files found.
models/comment.rb
View file @
9f427757
...
...
@@ -32,7 +32,6 @@ class Comment < Content
belongs_to
:comment_thread
,
index:
true
belongs_to
:author
,
class_name:
"User"
,
index:
true
after_save
:update_thread_index
attr_accessible
:body
,
:course_id
,
:anonymous
,
:anonymous_to_peers
,
:endorsed
...
...
@@ -116,10 +115,4 @@ private
self
.
comment_thread
.
update_attributes!
(
last_activity_at:
Time
.
now
.
utc
)
end
def
update_thread_index
#after each save of a comment, update it's thread's search index
#t = self.comment_thread
tire
.
update_index
end
end
models/comment_thread.rb
View file @
9f427757
...
...
@@ -50,7 +50,7 @@ class CommentThread < Content
end
belongs_to
:author
,
class_name:
"User"
,
inverse_of: :comment_threads
,
index:
true
#, autosave: true
has_many
:comments
,
dependent: :destroy
#, autosave: true# Use destroy to envoke callback on the top-level comments TODO async
has_many
:comments
,
dependent: :destroy
#, autosave: true# Use destroy to envoke callback on the top-level comments TODO async
has_many
:activities
,
autosave:
true
attr_accessible
:title
,
:body
,
:course_id
,
:commentable_id
,
:anonymous
,
:anonymous_to_peers
,
:closed
...
...
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