Module: YandexCaptcha::Helpers::Rails
- Defined in:
- lib/yandex_captcha/helpers/rails.rb
Instance Method Summary collapse
Instance Method Details
#captcha_tags(options = {}) ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/yandex_captcha/helpers/rails.rb', line 5 def ( = {}) error = [:error] ||= ((defined? flash) ? flash[:captcha_error] : "") if [:ajax] render partial: "yandex_captcha/captcha_ajax" else captcha = YandexCaptcha::Verify.get_captcha render partial: "yandex_captcha/captcha", locals: { captcha: captcha, error: error, noscript: [:noscript] } if captcha end end |