Commit 25a7db5d by Kevin Chugh

add JSON update

parent 790e719e
......@@ -46,6 +46,7 @@ helpers do
def pin(obj)
raise ArgumentError, "User id is required" unless user
obj.pinned = true
puts "\n\n\n\n\n\n******************HELLOE"
obj.save
obj.reload.to_hash.to_json
end
......
......@@ -177,6 +177,7 @@ class CommentThread < Content
"tags" => tags_array,
"type" => "thread",
"group_id" => group_id,
"pinned" => pinned,
"endorsed" => endorsed?)
if params[:recursive]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment