daviscabral / destroy_restricted

Prevents that related records could be removed, when set.

This URL has Read+Write access

destroy_restricted / README.mkdn
ce1e2e73 » daviscabral 2008-09-07 Author correction :-) 1 # DestroyRestricted
2
3 By default the rails allows only that the keys are defined with null or that the register be removed together.
4 This plugin prevents that related records could be removed, when set.
5
6 That initial proposal was created by Daniel Gatis and Rafael Ribeiro da Silva and transformed into a plugin by Davis Zanetti Cabral.
7
8 ## Simple Example
9
13a67782 » daviscabral 2009-03-23 Now is working again! \o/ 10 class Category < ActiveRecord::Base
11 has_many :products, :dependent => :restrict
12 end
ce1e2e73 » daviscabral 2008-09-07 Author correction :-) 13
14
15 Copyright (c) 2008 Davis Zanetti Cabral, released under the MIT license