Class: EasyCaptcha::CaptchaController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- EasyCaptcha::CaptchaController
- Defined in:
- lib/easy_captcha/captcha_controller.rb
Overview
captcha controller
Instance Method Summary collapse
-
#captcha ⇒ Object
captcha action send the generated image to browser.
Instance Method Details
#captcha ⇒ Object
captcha action send the generated image to browser
6 7 8 9 10 11 12 |
# File 'lib/easy_captcha/captcha_controller.rb', line 6 def captcha if params[:format] == "wav" and EasyCaptcha.espeak? send_data generate_speech_captcha, :disposition => 'inline', :type => 'audio/wav' else send_data generate_captcha, :disposition => 'inline', :type => 'image/png' end end |