Skip to content
forked from jwood/tenacity

A database client independent way of managing relationships between models backed by different databases.

Notifications You must be signed in to change notification settings

tinfoil/tenacity

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Tenacity

Build Status

A database client independent way of managing relationships between models backed by different databases.

Tenacity is heavily based on ActiveRecord's associations, and aims to behave in much the same way, supporting many of the same options.

Install

# In Gemfile
gem 'tenacity', git: 'git@github.com:jwg2s/tenacity.git', branch: 'develop'

Example

class Comment < ActiveRecord::Base
  include Tenacity

  t_belongs_to :commentable, polymorphic: true
end

class Firm < ActiveRecord::Base
  include Tenacity

  t_has_many :employees
  t_has_many :documents

  t_has_many :comments, as: :commentable, dependent: :destroy
end

Additional Usage Details

The directories that contain your model classes must be in your load path in order for Tenacity to find them.

####Supported Database Clients

  • ActiveRecord
  • Mongoid

About

A database client independent way of managing relationships between models backed by different databases.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%