Skip to content

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

License

Notifications You must be signed in to change notification settings

ambethia/vao_column

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages