public
Description: ActiveRecord plugin that allows validate_acceptance_of to be used with a real db column. This is included in ActiveRecord as of rails 2.0
Clone URL: git://github.com/ambethia/vao_column.git
Search Repo:
name age message
folder MIT-LICENSE Wed Nov 14 10:50:33 -0800 2007 Initial import of VAoColumn plugin [ambethia]
folder README Wed Nov 14 10:50:33 -0800 2007 Initial import of VAoColumn plugin [ambethia]
folder Rakefile Wed Nov 14 10:50:33 -0800 2007 Initial import of VAoColumn plugin [ambethia]
folder init.rb Wed Nov 14 10:50:33 -0800 2007 Initial import of VAoColumn plugin [ambethia]
folder lib/ Wed Nov 14 10:50:33 -0800 2007 Initial import of VAoColumn plugin [ambethia]
folder test/ Wed Nov 14 10:50:33 -0800 2007 Initial import of VAoColumn plugin [ambethia]
README
VAoColumn
=========

Allow validates_acceptance_of to store value on a database column of
the same name.

An example use case here, is that you want to use the current version
of the EULA as the :accept value, and store that column, so you can
refer to the explicit version the user accepted at a later date.

Example
=======

  ActiveRecord::Schema.define do
    create_table :pirates, :force => true do |t|
      t.column :catchphrase, :string
    end
  end

  class Pirate < ActiveRecord::Base
    validates_acceptance_of(:catchphrase, :accept => "Argh!")
  end

  "catchphrase" is a normal column method on the model, not just a
  virtual accessor.


Copyright (c) 2007 Jason L Perry, released under the MIT license