Module: EasyCaptcha::ViewHelpers

Defined in:
lib/easy_captcha/view_helpers.rb

Overview

helper class for ActionView

Instance Method Summary collapse

Instance Method Details

#captcha_tag(*args) ⇒ Object

generate an image_tag for captcha image



5
6
7
8
9
# File 'lib/easy_captcha/view_helpers.rb', line 5

def captcha_tag(*args)
  options = { :alt => 'captcha', :width => EasyCaptcha.image_width, :height => EasyCaptcha.image_height }
  options.merge! args.extract_options!
  image_tag(captcha_url(:i => Time.now.to_i), options)
end