Class: SimpleCaptchaController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- SimpleCaptchaController
- Includes:
- SimpleCaptcha::ImageHelpers
- Defined in:
- app/controllers/simple_captcha_controller.rb
Overview
class SimpleCaptchaController < ActionController::Metal
Constant Summary
Constants included from SimpleCaptcha::ImageHelpers
SimpleCaptcha::ImageHelpers::DISTORTIONS
Instance Method Summary collapse
-
#show ⇒ Object
GET /simple_captcha.
Methods included from SimpleCaptcha::ImageHelpers
Instance Method Details
#show ⇒ Object
GET /simple_captcha
9 10 11 12 13 14 15 16 17 18 19 |
# File 'app/controllers/simple_captcha_controller.rb', line 9 def show unless params[:id].blank? send_file( generate_simple_captcha_image(params[:id]), :type => 'image/png', :disposition => 'inline', :filename => 'simple_captcha.png') else self.response_body = [404, {"Content-Type" => "text/html"}, ["Not Found"]] end end |