# Captcha Fun

**URL:** <https://www.ruby-forum.com/t/captcha-fun/98588>\
**Category:** Rails\
**Created:** [July 16, 2006, 2:30pm UTC](https://www.ruby-forum.com/t/captcha-fun/98588 "2006-07-16T14:30:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [July 16, 2006, 2:30pm UTC](https://www.ruby-forum.com/t/captcha-fun/98588/1 "2006-07-16T14:30:35Z")

</div>

Hello,

I am trying to integrate a captcha into a form that is used to update a  
database. I am using a method that is outlined here:  
[http://svn.2750flesk.com/validates\_captcha/trunk/README](http://svn.2750flesk.com/validates_captcha/trunk/README), but things are  
not  
working correctly. The captcha image shows up in the user form, but the  
captcha input is being ignored. The following shows my controller file:

class PublicController \< ApplicationController  
include ActionView::Helpers::TextHelper

verify :method =\> :post, :only =\> [:destroy, :create, :update],  
:redirect\_to =\> { :action =\> :index }

def index  
@posts = Post.public\_posts  
end  
def save  
@supermodel = MySuperModel.find(params[:id])  
@supermodel.attributes = params[:my\_super\_model]  
@supermodel.save  
end  
def create  
@post = Post.new(params[:post])  
if @post.save  
flash[:notice] = ‘Post was successfully created.’  
redirect\_to :action =\> ‘index’  
else  
render :action =\> ‘new’  
end  
end

def new  
@post = Post.new  
end

end

The plugin is in my vendor/plugins directory as well. Here is my view:

\<%= start\_form\_tag(:action =\> “create”) %\>

| Title: | \<%= text\_field("post", "title", "size" =\> 46 ) %\> |
| Description: | \<%= text\_area("post", "description", "cols" =\> 40, "rows" =\> 10 ) %\> |
| \<% c = prepare\_captcha -%\> \<%= captcha\_hidden\_field c, 'my\_super\_model' %\> \<%= captcha\_image\_tag c %\> |
| \<%= captcha\_label 'my\_super\_model', 'Confirm Captcha   
' %\> \<%= captcha\_text\_field 'my\_super\_model' %\> |
| | \<%= submit\_tag(" Submit ") %\> |

\<%= end\_form\_tag %\>

Can anyone tell me what I am missing? I think that it is more that a  
form  
issue, since I am not getting errors about “wrong captcha” or anything  
like  
that.

Thanks
