diff --git a/app/controllers/public/comment_controller.rb b/app/controllers/public/comment_controller.rb index 1b436c4..37bc0b3 100644 --- a/app/controllers/public/comment_controller.rb +++ b/app/controllers/public/comment_controller.rb @@ -71,7 +71,9 @@ class CommentController < ApplicationController return end - @comment.save + if @comment.save + @plugins.dispatch(:process_extra_comment_params, [@comment,params]) + end respond_to do |format| format.js do @@ -113,6 +115,8 @@ class CommentController < ApplicationController def update if @comment.update_attributes(params[:comment]) + @plugins.dispatch(:process_extra_comment_params, [@comment,params]) + respond_to do |format| format.js do comment_to_render = @comment.comment_root diff --git a/app/views/comment/_comment.rhtml b/app/views/comment/_comment.rhtml index 645fd0e..9c67014 100644 --- a/app/views/comment/_comment.rhtml +++ b/app/views/comment/_comment.rhtml @@ -43,6 +43,7 @@
<%= txt2html comment.body %> + <%= @plugins.dispatch(:comment_extra_contents, local_assigns).collect { |content| instance_eval(&content) }.join("") %>