Module: YandexCaptcha::Helpers::Sinatra
- Defined in:
- lib/yandex_captcha/helpers/sinatra.rb
Instance Method Summary collapse
Instance Method Details
#captcha_tags(options = {}) ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/yandex_captcha/helpers/sinatra.rb', line 4 def ( = {}) template = settings.captcha_ajax_template.to_s.to_sym if [:ajax] render(current_engine, template, {layout: false}).to_s.html_safe else captcha = YandexCaptcha::Verify.get_captcha render(current_engine, template, {layout: false}, { captcha: captcha, noscript: [:noscript] }).to_s.html_safe if captcha end end |