ActiveRecord::Base Without Table plugin

Plugin details

Get the power of ActiveRecord models, including validation, without having a table in the database.

Websitehttp://www.kangarooit.com/developer_blog/2007/02/email-form-validation-in-ruby-on-rails.php Repositoryhttp://svn.viney.net.nz/things/rails/plugins/active_record_base_without_table/ Author Jonathan Viney Tags ActiveRecord LicenseMIT

Documentation

Install the plugin:
ruby script/plugin install http://svn.viney.net.nz/things/rails/plugins/active_record_base_without_table/
  class Contact < ActiveRecord::BaseWithoutTable
    column :name, :string
    column :email_address, :string
    column :message, :text
    
    validates_presence_of :name, :email_address, :string
  end


This model can be used just like a regular model based on a table, except it will never be saved to the database.

Further Documentation

There is currently no advanced documentation for this plugin.

New documentation

Edit plugin | (0 older versions) | Last edited by: hardway, 11 months ago