* Missing files
* Work on post exploration code by traversing dates
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
class CommentVotesController < ApplicationController
|
||||
def create
|
||||
@comment = Comment.find(params[:comment_id])
|
||||
@comment.vote!(params[:score])
|
||||
rescue CommentVote::Error => x
|
||||
@error = x
|
||||
end
|
||||
|
||||
def destroy
|
||||
|
||||
@@ -15,8 +15,6 @@ class CommentsController < ApplicationController
|
||||
def create
|
||||
@comment = Comment.new(params[:comment])
|
||||
@comment.post_id = params[:comment][:post_id]
|
||||
@comment.creator_id = CurrentUser.user.id
|
||||
@comment.ip_addr = request.remote_ip
|
||||
@comment.score = 0
|
||||
@comment.save
|
||||
respond_with(@comment) do |format|
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
class PostVotesController < ApplicationController
|
||||
def create
|
||||
@post = Post.find(params[:post_id])
|
||||
@post.vote!(params[:score])
|
||||
rescue PostVote::Error => x
|
||||
@error = x
|
||||
end
|
||||
|
||||
def destroy
|
||||
|
||||
Reference in New Issue
Block a user