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 (
commit 8f3c26fb8610184827b1f1f39d134bb681a82a9b
tree cc45b8acf32f0c94e9ce3ef46f51b0440f5bb446
parent 18c9ffe6b1248a25044172471dda3af237f2cd46
tree cc45b8acf32f0c94e9ce3ef46f51b0440f5bb446
parent 18c9ffe6b1248a25044172471dda3af237f2cd46
| name | age | message | |
|---|---|---|---|
| |
MIT-LICENSE | ||
| |
README.textile | ||
| |
Rakefile | ||
| |
init.rb | ||
| |
install.rb | ||
| |
lib/ | ||
| |
spec/ | ||
| |
tasks/ | ||
| |
uninstall.rb |
README.textile
Dependent Records
This Rails plugin reflects on a model’s associations, and returns a hash
of those which:
- Are not join associations
- Have the option
:dependent => :destroy - Are not empty
- Are one-to-many or many-to-many
I use it to show the user what the consequences of deleting a particular
record will be.
Example
Company.has_many :employees, :dependent => :destroy @company.dependent_records- => {"employees"=>[#, #]}








