Sha256: ba8ef1295572bc00f46c38bd210ab7d228355f68214a9db1668f02be13a20225

Contents?: true

Size: 1.03 KB

Versions: 1

Compression:

Stored size: 1.03 KB

Contents

class RaptchaController < ApplicationController
  def index # the image responder 
    Raptcha.render self, params 
  end

  def form # sample on how to use
    render :inline => <<-html
      <html>
        <body>
          <hr>
          <em>valid</em>:#{ Raptcha.valid? params }
          <hr>
          <form method=post>
            #{ Raptcha.input }
            <hr>
            <input type=submit name=submit value=submit />
            <hr>
            <a href="#{ request.request_uri }">new</a>
          </form>
        </body>
      </html>
    html
  end

  def inline # does not work in older internet exploders
    render :inline => <<-html
      <html>
        <body>
          <hr>
          <em>valid</em>:#{ Raptcha.valid? params }
          <hr>
          <form method=post>
            #{ Raptcha.input :inline => true }
            <hr>
            <input type=submit name=submit value=submit />
            <hr>
            <a href="#{ request.request_uri }">new</a>
          </form>
        </body>
      </html>
    html
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
raptcha-0.0.1 rails/app/controllers/raptcha_controller.rb