Class: Help::CommentsController

Inherits:
InsightController
  • Object
show all
Defined in:
app/controllers/help/comments_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



5
6
7
8
9
10
11
12
# File 'app/controllers/help/comments_controller.rb', line 5

def create
  @comment = Comment.new(params[:comment].merge(defaults))
  if verify_recaptcha(:model => @comment, :private_key => Insight.configuration.recaptcha_private_key) && @comment.save
    redirect_to(help_issue_path(@comment.issue.to_param))
  else
    redirect_to(help_issue_path(@comment.issue.to_param))
  end
end