Module: SimpleCaptcha::ViewHelper

Defined in:
lib/simple_audio_captcha/view.rb

Instance Method Summary collapse

Instance Method Details

#__simple_captcha_options__Object

TODO: Devise some way to use super here..



4
# File 'lib/simple_audio_captcha/view.rb', line 4

alias_method :__simple_captcha_options__, :simple_captcha_options

#simple_captcha_options(options = {}) ⇒ Object



6
7
8
9
10
11
12
13
14
# File 'lib/simple_audio_captcha/view.rb', line 6

def simple_captcha_options(options = {})
  super_options = __simple_captcha_options__(options)

  key = super_options[:field_value]

  super_options.merge({
    audio: simple_audio_captcha(key, options)
  })
end