I'm trying to override the create method from the Registrations Controller in Devise to include Recaptcha verification (as seen here and here):
class RegistrationsController < Devise::RegistrationsController
def create
if verify_recaptcha
super
else
build_resource
clean_up_passwords(resource)
flash[:alert] = "Bad words."
render_with_scope :new
end
end
end
Also changed my routes.rb accordingly:
map.devise_for :users, :controllers => {:registrations => "registrations"}, :path_names => {
:sign_up => 'signup',
:sign_in => 'login',
:sign_out => 'logout'
}
When trying to visit the new registration page (with new path name: http://localhost:3000/users/signup) this errors shows up:
LoadError in RegistrationsController#new
Expected /home/benoror/project/app/controllers/registrations_controller.rb to define RegistrationsController
Any help appreciated.
BTW, I'm using Devise 1.0.11 and Rails 2.3.10, thanks!