Sha256: 12cef9fda4b1cee7e299f3b0f84b0789a81ff14ad60ff5a713a8f0d5daa35e56

Contents?: true

Size: 390 Bytes

Versions: 2

Compression:

Stored size: 390 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.1.0 app/controllers/dalli_captcha/captcha_controller.rb
dalli_captcha-0.0.3 app/controllers/dalli_captcha/captcha_controller.rb