Skip to content
This repository has been archived by the owner on Jan 4, 2021. It is now read-only.

sealink/dependent_restrict

Repository files navigation

Dependent Restrict

Gem Version Build Status Coverage Status Dependency Status Code Climate

A gem for rails 2, 3 and 4 that retrofits and improves rails 4 functionality

Rails 4 offers 2 very useful dependent restrictions:

dependent: :raise_with_exception
dependent: :raise_with_error

In rails 3 it was just:

dependent: :raise # same sa raise_with_exception

In rails 2 these didn't exist, it was just

dependent: destroy

Which is available in rails 2, 3 and 4

Differences from standard rails 4

  • Error includes detailed message which shows up to 5 of the records that are dependent This is useful for users to know which dependencies must be removed before they can remove the parent record

About

Improves dependent restrict in ActiveRecord 4 and backports to AR 2/3

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages