Sha256: 2d40b4b091fe62aada75572be3c47016867acd384d5deb3064dd02446e482c6c

Contents?: true

Size: 403 Bytes

Versions: 2

Compression:

Stored size: 403 Bytes

Contents

module DalliCaptcha
  class CaptchaController < ApplicationController
    def show
      captcha = DalliCaptcha::Image.new(session[:captcha_key])
      tempfile = captcha.generate
      if tempfile
        send_file(tempfile.path, :type => captcha.content_type, :disposition => 'inline', :filename => captcha.filename)
      else
        render :nothing => true
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dalli_captcha-0.0.2 app/controllers/dalli_captcha/captcha_controller.rb
dalli_captcha-0.0.1 app/controllers/dalli_captcha/captcha_controller.rb