diff options
Diffstat (limited to 'app/controllers/comments_controller.rb')
| -rw-r--r-- | app/controllers/comments_controller.rb | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb deleted file mode 100644 index 36c30126..00000000 --- a/app/controllers/comments_controller.rb +++ /dev/null @@ -1,17 +0,0 @@ -class CommentsController < ApplicationController - def create - creation = Creation.find(creation_id) - @comment = current_user.comment_on(creation, comment_params[:text], comment_params[:id]) - render json: @comment - end - - private - - def creation_id - params[:url].match(/\/(\d+)/)[0].gsub("/", "") - end - - def comment_params - params.require(:comment).permit(:id, :text) - end -end |
