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