Class: SimpleCaptchaController
- Inherits:
-
ActionController::Metal
- Object
- ActionController::Metal
- SimpleCaptchaController
- Includes:
- ActionController::Streaming, SimpleCaptcha::ImageHelpers
- Defined in:
- app/controllers/simple_captcha_controller.rb
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
6 7 8 9 10 11 12 13 14 15 16 |
# File 'app/controllers/simple_captcha_controller.rb', line 6 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 |