Module: QuickCaptcha::ImageHelpers
- Included in:
- QuickCaptchaController
- Defined in:
- lib/quick_captcha/image_helpers.rb
Overview
:nodoc
Constant Summary collapse
- IMAGE_STYLES =
[ 'embosed_silver', 'simply_red', 'simply_green', 'simply_blue', 'distorted_black', 'all_black', 'charcoal_grey', 'almost_invisible' ]
Instance Method Summary collapse
Instance Method Details
#generate_simple_captcha_image(options = {}) ⇒ Object
:nodoc
6 7 8 9 10 11 12 13 14 |
# File 'lib/quick_captcha/image_helpers.rb', line 6 def generate_simple_captcha_image( = {}) = QuickCaptcha..merge() key = .delete(:simple_captcha_key) captcha_text = QuickCaptcha::CaptchaUtils.simple_captcha_value(key) [:captcha_text] = captcha_text [:distortion] = distortion([:distortion]) [:image_style] = image_style([:image_style]) QuickCaptcha.backend.generate_simple_captcha_image() end |