I’ve installed the ruby-recaptcha gem as instructed here:
http://bitbucket.org/mml/ruby-recaptcha/wiki/Home
Here are the steps that I’ve comleted:
- installed the gem
- added config.gem ‘ruby-recaptcha’ environment.rb:
- modified action_controller.rb
class ApplicationController < ActionController::Base
include ReCaptcha::AppHelper
- modified application_helper.rb like so:
module ApplicationHelper
include ReCaptcha::ViewHelper
The inclusion of the Recaptcha::ViewHelper works. Meaning this tag:
<%= get_captcha(:options => {:theme => ‘clean’}) %>
Renders an image.
However, the controllers are another can of worms:
calls like:
if validate_recap(params, @user.errors) && @user.save
fail with the following message:
NoMethodError (undefined method `validate_recap’ for
#ActionView::Base:0x734b578):
Which tells me that the module is not being mixed into application
controller and not then not inherited.
Does anybody have any ideas? Is ruby-recaptcha a reputable product?