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 | |
|---|---|---|---|
| |
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"=>[#(Employee id: 1), #(Employee id: 2)]}







