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
7e9265f6
Commit
7e9265f6
authored
Jun 30, 2012
by
Rocky Duan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add instructor endorsement field
parent
e7e0fd8c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletions
+10
-1
db/migrate/006_add_endorsed_to_comments.rb
+9
-0
models/comment.rb
+1
-1
No files found.
db/migrate/006_add_endorsed_to_comments.rb
0 → 100644
View file @
7e9265f6
class
AddEndorsedToComments
<
ActiveRecord
::
Migration
def
self
.
up
add_column
:comments
,
:endorsed
,
:boolean
,
:default
=>
false
end
def
self
.
down
remove_column
:comments
,
:endorsed
end
end
models/comment.rb
View file @
7e9265f6
...
...
@@ -4,7 +4,7 @@ require 'thumbs_up'
class
Comment
<
ActiveRecord
::
Base
attr_accessible
:body
,
:title
,
:user_id
,
:course_id
,
:comment_thread_id
attr_accessible
:body
,
:title
,
:user_id
,
:course_id
,
:
endorsed
,
:
comment_thread_id
has_ancestry
:cache_depth
=>
true
...
...
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