Sha256: a43ee61c96fdbdeded8e277af7285bb6fb8fc203e9fc4a71e01fe31d255d9e1e

Contents?: true

Size: 503 Bytes

Versions: 2

Compression:

Stored size: 503 Bytes

Contents

module YandexCaptcha
  module Helpers
    module Sinatra
      def captcha_tags(options = {})
        template = settings.captcha_ajax_template.to_s.to_sym
        if options[: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: options[:noscript] }).to_s.html_safe if captcha
        end
      end

    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
yandex_captcha-0.4.3.4 lib/yandex_captcha/helpers/sinatra.rb
yandex_captcha-0.4.3.3 lib/yandex_captcha/helpers/sinatra.rb