A gem that makes ActiveRecord subclasses on the fly
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
test
Manifest
README
Rakefile
auto_ar.gemspec

README

This gem makes subclasses of ActiveRecord::Base and
sets associations(has_many, belongs_to) to the class on demand.

  require 'rubygems'
  require 'active_record'
  require 'auto_ar'

  ActiveRecord::Base.establish_connection(:adapter => 'sqlite3',
                                          :database => 'foo.sqlite3')

  blogs = Blog.find(:all) # <= You can use Blog class without blog.rb
  comments = blog[0].comments # <= You can get Comment class instances without comment.rb