Module: ODDB::View::Captcha

Included in:
FeedbackForm, NotifyInnerComposite
Defined in:
src/view/captcha.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) captcha(model)



7
8
9
10
# File 'src/view/captcha.rb', line 7

def captcha(model)
  name = "captcha[#{challenge.id}]"
  HtmlGrid::InputText.new(name, model, @session, self)
end

- (Object) captcha_image(model)



11
12
13
14
15
# File 'src/view/captcha.rb', line 11

def captcha_image(model)
  img = HtmlGrid::Image.new(:file, challenge, @session, self)
  img.attributes["src"] = File.join('', 'resources', 'captchas', challenge.file)
  img
end

- (Object) challenge



4
5
6
# File 'src/view/captcha.rb', line 4

def challenge
  @challenge ||= @lookandfeel.generate_challenge
end