<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -8,4 +8,19 @@ end
 
 == In the view
 
-&lt;%= captcha_field(&quot;user&quot;) %&gt;
\ No newline at end of file
+&lt;p&gt;
+  Unless you are a bot answer this question: &lt;%= captcha_display %&gt;
+&lt;p&gt;
+&lt;p&gt;
+  &lt;%= captcha_field(&quot;user&quot;) %&gt;
+&lt;/p&gt;
+
+== Generated HTML
+
+&lt;p&gt;
+  Unless you are a bot answer this question: &lt;span class='less_captcha_challenge'&gt;What is 4 + 7?&lt;/span&gt;
+&lt;/p&gt;
+&lt;p&gt;
+  &lt;input type=&quot;text&quot; name=&quot;entry[captcha]&quot; /&gt;
+  &lt;input type=&quot;hidden&quot; name=&quot;entry[captcha_answer]&quot; value=&quot;e43b21e80194c61f30930a442f2c19de6fe74f8c&quot; /&gt;
+&lt;/p&gt;
\ No newline at end of file</diff>
      <filename>README</filename>
    </modified>
    <modified>
      <diff>@@ -40,12 +40,21 @@ module Less
     module InstanceMethods
       # Sets up the passing answer for the captcha challenge
       #
-      #   setup_captcha 'foo'
+      #   setup_captcha
       #
       # options:
       # * &lt;tt&gt;answer&lt;/tt&gt; - The passing answer for the captcha challenge
-      def setup_captcha(answer)
-        send(PREFIX + SUFFIX + '=', Digest::SHA1.hexdigest(SALT + answer.to_s))
+      def setup_captcha
+        unless send(PREFIX) and send(PREFIX + SUFFIX)
+          b = rand(10) + 1
+          a = b + rand(10)
+          op = ['+', '-'][rand(2)]
+          question = &quot;What is #{a} #{op} #{b}?&quot;
+          answer = a.send(op, b)
+          
+          send(PREFIX + '=', question.to_s)
+          send(PREFIX + SUFFIX + '=', Digest::SHA1.hexdigest(SALT + answer.to_s))
+        end
       end
     end
 
@@ -61,16 +70,35 @@ module Less
       #
       # You can use the +options+ argument to pass additional options to the text-field tag.
       def captcha_field(object, options={})
-        b = rand(10) + 1
-        a = b + rand(10)
-        op = ['+', '-'][rand(2)]
-        question = &quot;What is #{a} #{op} #{b}?&quot;
-        answer = a.send(op, b)
-        eval(&quot;@&quot;+object.to_s).setup_captcha(answer)
+        if object.is_a?(String) or object.is_a?(Symbol)
+          eval(&quot;@&quot;+object.to_s).setup_captcha
+        else
+          object.setup_captcha
+        end
 
         result = ActionView::Helpers::InstanceTag.new(object, PREFIX, self).to_input_field_tag(&quot;text&quot;, options)
         result &lt;&lt; ActionView::Helpers::InstanceTag.new(object, PREFIX + SUFFIX, self).to_input_field_tag(&quot;hidden&quot;, {})
       end
+      
+      # Use this helper to display a captcha challenge question
+      #
+      #   &lt;%= captcha_display %&gt;
+      #
+      # the following HTML will be generated.
+      #
+      #   &lt;span class='less_captcha_challenge'&gt;...&lt;/span&gt;
+      #
+      def captcha_display
+        if object.is_a?(String) or object.is_a?(Symbol)
+          eval(&quot;@&quot;+object.to_s).setup_captcha
+          captcha = eval(&quot;@&quot;+object.to_s).send(PREFIX)
+        else
+          object.setup_captcha
+          captcha = object.send(PREFIX)
+        end
+        
+        &quot;&lt;span class='less_captcha_challenge'&gt;#{captcha}&lt;/span&gt;&quot;
+      end
     end
   end
 end
\ No newline at end of file</diff>
      <filename>lib/less_captcha.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>install.rb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>92817d701a8389812d1472a339bbad47c96eaf99</id>
    </parent>
  </parents>
  <author>
    <name>bwyrosdick</name>
    <email>ben.wyrosdick@gmail.com</email>
  </author>
  <url>http://github.com/bwyrosdick/less-captcha/commit/6bcfe61d4026e5e425a9c808792a80a8c03224f1</url>
  <id>6bcfe61d4026e5e425a9c808792a80a8c03224f1</id>
  <committed-date>2008-03-25T09:10:46-07:00</committed-date>
  <authored-date>2008-03-25T09:10:46-07:00</authored-date>
  <message>broke apart the question from the fields and updated README</message>
  <tree>343691b04a711ea021218c7573c0c2be0e6ae967</tree>
  <committer>
    <name>bwyrosdick</name>
    <email>ben.wyrosdick@gmail.com</email>
  </committer>
</commit>
