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 Mon Mar 23 01:35:52 -0700 2009 Now is working again! \o/ [daviscabral]
file Rakefile Fri Apr 18 11:57:38 -0700 2008 first commit [daviscabral]
file init.rb Fri Apr 18 11:57:38 -0700 2008 first commit [daviscabral]
file install.rb Fri Apr 18 11:57:38 -0700 2008 first commit [daviscabral]
directory lib/ Mon Mar 23 01:35:52 -0700 2009 Now is working again! \o/ [daviscabral]
directory tasks/ Fri Apr 18 11:57:38 -0700 2008 first commit [daviscabral]
directory test/ Fri Apr 18 11:57:38 -0700 2008 first commit [daviscabral]
file uninstall.rb Fri Apr 18 11:57:38 -0700 2008 first commit [daviscabral]
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