Skip to content
jwg2sPublic
forked from jwood/tenacity

About

Tenacity

Resources

Stars

1 star

Watchers

0 watching

Forks

 
 

Latest commit

 

History

311 Commits

Folders and files

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

Tenacity

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages