Sha256: e0e2ecfe6ad121a6c8161b7456eef47e25ca8b2a58d46004785fc468a7c2c9d4

Contents?: true

Size: 451 Bytes

Versions: 1

Compression:

Stored size: 451 Bytes

Contents

module Captcher
  class CaptchasController < ActionController::Base
    include Captcher::CaptchaAware

    def show
      render_captcha(load_captcha)
    end

    def reload
      render_captcha(reload_captcha)
    end
    alias refresh reload

    def confirm
      if confirm_captcha?(params[:captcha])
        render json: { success: true }, status: 200
      else
        render json: { success: false }, status: 422
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
captcher-0.3.1 app/controllers/captcher/captchas_controller.rb