Skip to content
How to write a module to extend class and instance methods of a given class or module
Find file
Pull request Compare This branch is 3 commits ahead of timmatheson:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



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
Something went wrong with that request. Please try again.