public
Description: Prevents that related records could be removed, when set.
Homepage: http://forum.rubyonbr.org/forums/14/topics/613
Clone URL: git://github.com/daviscabral/destroy_restricted.git
name age message
file MIT-LICENSE Fri Apr 18 11:57:38 -0700 2008 first commit [daviscabral]
file README.mkdn Loading commit data...
file Rakefile Fri Apr 18 11:57:38 -0700 2008 first commit [daviscabral]
file init.rb
file install.rb
directory lib/
directory tasks/
directory test/
file uninstall.rb
README.mkdn

DestroyRestricted

By default the rails allows only that the keys are defined with null or that the register be removed together. This plugin prevents that related records could be removed, when set.

That initial proposal was created by Daniel Gatis and Rafael Ribeiro da Silva and transformed into a plugin by Davis Zanetti Cabral.

Simple Example

    class Category < ActiveRecord::Base
            has_many :products, :dependent => :restrict
    end

Copyright (c) 2008 Davis Zanetti Cabral, released under the MIT license