Skip to content

Latest commit

 

History

History
18 lines (12 loc) · 548 Bytes

README.textile

File metadata and controls

18 lines (12 loc) · 548 Bytes

Tableless

Tableless is a simple, almost trivial mixin, that will let you use ActiveRecord models without a corresponding database table

This will be useful for those of us who are not using Rails 3, but need the ActiveRecord validation functionality, or would like to transparently use cool things like Formtastic.

Usage is simple. Firstly place tableless.rb in APP_DIR/lib, then:

class MyModel < ActiveRecord::Base
	include Tableless

	column :field_one, :string
	column :field_two, :text
	column :field_three, :boolean
end