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
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---