This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Sun Apr 27 21:14:22 -0700 2008 | |
| |
README | Tue Apr 29 06:23:54 -0700 2008 | |
| |
init.rb | Sun Apr 27 21:14:22 -0700 2008 | |
| |
install.rb | Sun Apr 27 21:14:22 -0700 2008 | |
| |
lib/ | Sun Apr 27 21:16:08 -0700 2008 | |
| |
spec/ | Sun Apr 27 21:16:08 -0700 2008 | |
| |
tasks/ | Sun Apr 27 21:14:22 -0700 2008 | |
| |
uninstall.rb | Sun Apr 27 21:14:22 -0700 2008 |
README
RelatesTo ========= Relates To provides easy ways to have dual polymorphic bindings between objects with 'natures' included. For instance, if you have users and groups, a user might be related to a group as a leader. This plugin is designed to provide simple-to-use association-like methods to set up relationships and provide all of the necessary helper methods that go with. Example ======= class User < ActiveRecord::Base relates_to :groups, :as => [:leader, :member] end class Group < ActiveRecord::Base has_related :users, :as => [:leader, :member] end @user = User.find(:first) @group = Group.find(:first) @user.relates_to(@group, :as => :leader) @user.groups # => [@group] # TODO @user.groups.as_member # => [] @user.groups.as_leader # => [@group] @group.users # => [@user] # TODO @group.users.members # => [] @group.users.leaders # => [@user] # TODO: generator for relationships table # TODO: default nature Resources ========= GitHub: http://github.com/mbleigh/relates-to Lighthouse: http://mbleigh.lighthouseapp.com/projects/10498-relates-to Copyright (c) 2008 Michael Bleigh (http://mbleigh.com/) and Intridea Inc. (http://intridea.com/), released under the MIT license







