module ActiveRecord::Tableless

ActiveRecord::Tableless

Allow classes to behave like ActiveRecord models, but without an associated database table. A great way to capitalize on validations. Based on the original post at www.railsweenie.com/forums/2/topics/724 (which seems to have disappeared from the face of the earth).

Example usage

class ContactMessage < ActiveRecord::Base

  has_no_table

  column :name,    :string
  column :email,   :string
  column :message, :string

end

msg = ContactMessage.new( params[:msg] )
if msg.valid?
  ContactMessageSender.deliver_message( msg )
  redirect_to :action => :sent
end

Constants

VERSION