Class: BlogsCaptcha::CaptchaController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- BlogsCaptcha::CaptchaController
- Defined in:
- app/controllers/blogs_captcha/captcha_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'app/controllers/blogs_captcha/captcha_controller.rb', line 3 def index return head :ok if request.head? headers['Cache-Control'] = 'no-cache, no-store, max-age=0, must-revalidate' headers['Pragma'] = 'no-cache' data = generate_captcha opts = { disposition: 'inline', type: 'image/gif' } send_data data, opts end |