Adds invisible_captcha to proposals, debates & sps

This commit is contained in:
kikito
2016-04-26 17:12:09 +02:00
parent 4b74a69680
commit 289182b145
7 changed files with 112 additions and 8 deletions

View File

@@ -11,7 +11,7 @@ class DebatesController < ApplicationController
feature_flag :debates
invisible_captcha only: [:create, :update], honeypot: :subtitle
invisible_captcha only: [:create, :update], honeypot: :subtitle, on_timestamp_spam: :redirect_timestamp_spam
has_orders %w{hot_score confidence_score created_at relevance}, only: :index
has_orders %w{most_voted newest oldest}, only: :show
@@ -54,4 +54,8 @@ class DebatesController < ApplicationController
Debate
end
def redirect_timestamp_spam
redirect_to root_path, notice: InvisibleCaptcha.timestamp_error_message
end
end