Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Provides a single point of entry for using basic features of ruby ORMs

tag: v0.0.1

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 spec
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 Gemfile.lock
Octocat-spinner-32 History.txt
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.rdoc
Octocat-spinner-32 Rakefile
Octocat-spinner-32 VERSION.yml
Octocat-spinner-32 orm_adapter.gemspec
README.rdoc

orm_adapter

Provides a single point of entry for popular ruby ORMs. Its target audience is gem authors who want to support more than one ORM.

Currently supported ORMs are ActiveRecord, DataMapper and MongoId.

Example of use

require 'orm_adapter'

User # is it an ActiveRecord, DM Resource, or MongoId Document?

User.to_adapter.find_first :name => 'Fred' # we don't care!

user_model = User.to_adapter
user_model.get!(1)                      # find a record by id
user_model.find_first(:name => 'fred')  # find first fred
user_model.find_all(:name => 'fred')    # find all freds
user_model.create!(:name => 'fred')     # create a fred

History

orm_adapter is an extraction from pickle by Ian White. Pickle's orm adapter included work by Daniel Neighman and Josh Bassett. José Valim suggested the extraction, and worked on the first release with Ian.

Copyright

Copyright © 2010 Ian White and José Valim. See LICENSE for details.

Something went wrong with that request. Please try again.