summaryrefslogtreecommitdiff
path: root/app/controllers/captchas_controller.rb
blob: 2bf16320810d802c923ada2942a86a029a11e5a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# frozen_string_literal: true
require 'captcha'

class CaptchasController < ApplicationController
  skip_authorization_check only: [:create]

  def create
    # This captcha solution can be used for 10 minutes.
    @captcha = Captcha.new

    respond_to do |format|
      format.js  { render }
      format.any { head 406 }
    end
  end
end