Skip to content

How to write a module to extend class and instance methods of a given class or module

Notifications You must be signed in to change notification settings

willrjmarshall/Tableless

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

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
	

About

How to write a module to extend class and instance methods of a given class or module

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%