Project

associator

0.0
No commit activity in last 3 years
No release in over 3 years
Associate any model to any model.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 2.8.0
~> 2.8.1

Runtime

~> 3.1.3
 Project Readme

Associator

Associate any model to any model.

Description

Creates a one-to-many relationship between any models.

#Installation 1 Add to your application Gemfile

  gem 'associator'

2 Type

  bundle install
  rake associator_engine:install:migrations
  rake db:migrate

#Usage ##In your rails app model ###Add to your model

  associated :with => :THE_OTHER_MODEL_NAME

or

  associated :with => :RELATION_NAME, :class_name => 'THE_OTHER_MODEL_CLASS_NAME'

###Add relation

  foo = Foo.first
  bar = Bar.first
  foo.add_associated bar

###Remove relation

  foo = Foo.first
  bar = Bar.first
  foo.del_associated bar

License

Released under the MIT license: http://www.opensource.org/licenses/MIT