Sha256: 5c6cb29ab9112b3e155fcaaf39d75cd1385479ce36c7e0b0aedd2ab4cf1a21b5
Contents?: true
Size: 483 Bytes
Versions: 2
Compression:
Stored size: 483 Bytes
Contents
class SimpleCaptchaController < ActionController::Metal include ActionController::Streaming include SimpleCaptcha::ImageHelpers # GET /simple_captcha def show unless params[:id].blank? send_file( generate_simple_captcha_image(params[:id]), :type => 'image/jpeg', :disposition => 'inline', :filename => 'simple_captcha.jpg') else self.response_body = [404, {"Content-Type" => "text/html"}, ["Not Found"]] end end end
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
galetahub-simple_captcha-0.1.1 | app/controllers/simple_captcha_controller.rb |
nogara-simple_captcha-0.1.1 | app/controllers/simple_captcha_controller.rb |