Repository is archived
No commit activity in last 3 years
No release in over 3 years
This gem is not needed in Rails 3 as dependent => :raise is included in 3.0.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

< 4.0.0, >= 2.3.0
 Project Readme

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