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 | Mon Sep 08 03:01:21 -0700 2008 | |
| |
MIT-LICENSE | Mon Sep 08 03:01:21 -0700 2008 | |
| |
README | Thu Aug 06 01:31:50 -0700 2009 | |
| |
Rakefile | Mon Sep 08 03:01:21 -0700 2008 | |
| |
init.rb | Thu Aug 06 01:25:23 -0700 2009 | |
| |
install.rb | Mon Sep 08 03:01:21 -0700 2008 | |
| |
lib/ | Fri Aug 07 03:06:39 -0700 2009 | |
| |
tasks/ | Mon Sep 08 03:01:21 -0700 2008 | |
| |
test/ | Fri Aug 07 03:06:39 -0700 2009 | |
| |
uninstall.rb | Mon Sep 08 03:01:21 -0700 2008 |
README
ParentalControl =============== Using parental control your associations will share model instances with each other where appropriate. For example, when using a parent to fetch a child, the child will return the same parent instance if you ask it for it's parent, rather than fetching it from the database. This might increase performance. It might not. It might make it easier to do things where a child relies on a parent for validation, and you make changes to both parent and child before saving. So far it works for has_many and has_one (not :through) associations. It also works for belongs_to asociations where the reciprocal association on the parent is a has_one. For polymorphic associations it works for the belongs_to ends, but not the has_one or has_many ends of the association. Example ======= Scenario: class Man < ActiveRecord::Base has_one :face end class Face < ActiveRecord::Base belongs_to :man end m = Man.first f = m.face m.name == f.man.name # => true m.name = 'Dave' Without parental_control m.name == f.man.name # => false : m and f.man are different instances of Man.first :( With parental_control m.name == f.man.name # => true : m and f.man are the same instances of Man.first :) Copyright (c) 2008 Murray Steele, released under the MIT license







