Forum: Ruby on Rails Recaptcha plugin problem

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
eng. Ilian Iliev (Guest)
on 2009-05-13 13:54
(Received via mailing list)
Hi all,

I am using radiant CMS and I am trying to create custom extension and
add recaptcha validation to it
but when I call
   if not verify_recaptcha(:private_key => 'aaaaaaaaaaa')
     #add error
   end
I get: undefined method `verify_recaptcha' for #<Comment:0x4f4c460>

Bellow is the full code for my model class

class Comment < ActiveRecord::Base

  validates_presence_of :title, :author, :comment, :message =>
'required'

  validate :check_captcha

  def check_captcha
    if not verify_recaptcha(:private_key => 'aaaaaaaaaaa')
      errors.add(:title, 'def error');
    end
  end


end

Please someone help

10x in adance,
Ilian Iliev
This topic is locked and can not be replied to.