https://github.com/krisleech/polymorphia
Associate any ActiveRecord object to another
https://github.com/krisleech/polymorphia
Last synced: 8 months ago
JSON representation
Associate any ActiveRecord object to another
- Host: GitHub
- URL: https://github.com/krisleech/polymorphia
- Owner: krisleech
- Created: 2012-01-24T21:32:23.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2012-01-24T21:39:56.000Z (over 14 years ago)
- Last Synced: 2025-03-17T04:44:46.763Z (about 1 year ago)
- Language: Ruby
- Homepage:
- Size: 89.8 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Polymorphia
Associate any ActiveRecord object to another _without_ `has_one`, `has_many`, `has_and_belongs_to_many`, or join tables.
THIS IS AN FUN EXPERIMENT AND A WORK IN PROGRESS
```ruby
Associate.this(person).to(university).commit!
Assosiate.this(website).with(category)
Assosiate.find(:category).for(website)
Assosaite.find(:all).for(website)
Assosaite.find(:comment).for(:post).via(blog)
Assosaite.find(:documents).via(:category).for(website)
```