ecole_eft_app/app/controllers/public/comments_controller.rb
Nicolas Bally 7a88e9f553 modif 3
2012-06-19 10:26:36 +02:00

20 lines
314 B
Ruby

class Public::CommentsController < ApplicationController
def create
@comment = Comment.new(params[:comment])
@comment.enabled = true
if @comment.save
commentable = @comment.commentable
@comment_id = @comment.id
@comment = Comment.new
@comment.commentable = commentable
end
end
end