Dependent Protect Option plugin

Plugin details

Adds a new option :protect for the parameter :depends from has_many method.

Websitehttp://ruido-blanco.net/blog/rails-dependent-protect-plugin-english Repositoryhttp://svn.ruido-blanco.net/dependent_protect/trunk Author Daniel Rodríguez Troitiño Tags option LicenseMIT

Documentation

Install the plugin:
ruby script/plugin install http://svn.ruido-blanco.net/dependent_protect/trunk

This option forbids destroying records with associated records in a association created with :dependent => :protect option, more or less like ON DELETE RESTRICT SQL statement. If you try to destroy a record with associated records it will raise a ActiveRecord::ReferentialIntegrityProtectionError (defined also in this plugin).

Further Documentation

There is currently no advanced documentation for this plugin.

New documentation

Edit plugin | (0 older versions) | Last edited by: hardway, about 1 year ago