Skip to content
A gem that makes ActiveRecord subclasses on the fly
Ruby
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
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

Something went wrong with that request. Please try again.