20 lines
289 B
Ruby
20 lines
289 B
Ruby
class Public::CommentsController < ApplicationController
|
|
|
|
def create
|
|
@comment = Comment.new(params[:comment])
|
|
|
|
@comment.enabled = true
|
|
|
|
|
|
if @comment.save
|
|
commentable = @comment.commentable
|
|
|
|
@comment = Comment.new
|
|
@comment.commentable = commentable
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|